Pesquisa resultou em 197 ocorrências: +EnumIndex

Termo pesquisado: +enumindex

por JoséQuintas
20 Nov 2025 09:48
Fórum: Contribuições, Dicas e Tutoriais
Tópico: Fluxo dos fontes
Respostas: 3
Exibições: 169

Fluxo dos fontes

... mover pra onde foi chamada, se só chamada 1 vez

FOR EACH aItem IN aNewList DESCEND
IF MoveItem( aItem, aNewList )
hb_ADel( aNewList, aItem:__EnumIndex(), .T. )
ENDIF
NEXT

ShowList( aNewList, "" )

? "Fim"
Inkey(0)

RETURN

FUNCTION ShowList( aList, cText )

LOCAL aItem
FOR EACH aItem IN ...
por JoséQuintas
03 Jul 2025 21:13
Fórum: [x]Harbour
Tópico: Calendário, marcar dia trabalhado
Respostas: 35
Exibições: 17045

Calendário, marcar dia trabalhado

Lembrando também que o FOR/EACH vale pra letras.

Código: Selecionar todos

aDias := Array(31)
FOR EACH cLetra IN Substr( cCampo, 7 ) // pula yyyymm ano/mes
   aDias[ cLetra:__EnumIndex() ] := cLetra
NEXT
por JoséQuintas
07 Jun 2025 14:35
Fórum: MiniGui
Tópico: Teste de OOP real
Respostas: 2
Exibições: 995

Teste de OOP real

... Activate()



IF ! Empty( oDay )
oCheck := ObjFromStack():New( xDlg, oDay )
IF oCheck:Value
cTxt += Dtoc( Stod( "2025" + StrZero( oMonth:__EnumIndex(), 2 ) + StrZero( oDay:__EnumIndex(), 2 ) ) ) + " "
ENDIF
ENDIF


Foi só teste, são tão poucas linhas, que usar OOP parece perda de tempo.
Mas ...
por JoséQuintas
07 Jun 2025 10:54
Fórum: MiniGui
Tópico: Calendário pra marcar datas
Respostas: 2
Exibições: 1061

Calendário pra marcar datas

... FOR EACH oDay IN oMonth
IF ! Empty( oDay ) .AND. GetProperty( xDlg, oDay, "Value" ) // error
cTxt += Dtoc( Stod( "2025" + StrZero( oMonth:__EnumIndex(), 2 ) + StrZero( oDay:__EnumIndex(), 2 ) ) ) + " "
ENDIF
NEXT
NEXT
MsgBox( cTxt )

(xDlg);(xTab) // warning -w3 -es2

RETURN Nil ...
por JoséQuintas
04 Jun 2025 21:24
Fórum: [x]Harbour
Tópico: Calendário, marcar dia trabalhado
Respostas: 35
Exibições: 17045

Calendário, marcar dia trabalhado

... FOR EACH oMonth IN aValue
FOR EACH oDay IN oMonth
IF ValType( oDay ) == "O" .AND. oDay:Value
cTxt += Dtoc( Stod( "2025" + StrZero( oMonth:__EnumIndex(), 2 ) + StrZero( oDay:__EnumIndex(), 2 ) ) ) + " "
ENDIF
NEXT
NEXT
hwg_MsgInfo( cTxt )

RETURN Nil


E agora mais um, pra ano anterior ...
por JoséQuintas
04 Jun 2025 18:14
Fórum: [x]Harbour
Tópico: Calendário, marcar dia trabalhado
Respostas: 35
Exibições: 17045

Calendário, marcar dia trabalhado

... cTxt := "", oMonth, oDay

FOR EACH oMonth IN aValue
FOR EACH oDay IN oMonth
IF ValType( oDay ) == "O" .AND. oDay:Value
cTxt += Dtoc( Stod( "2025" + StrZero( oMonth:__EnumIndex(), 2 ) + StrZero( oDay:__EnumIndex(), 2 ) ) ) + " "
ENDIF
NEXT
NEXT
hwg_MsgInfo( cTxt )

RETURN Nil


checkbox.png
por JoséQuintas
16 Mai 2025 14:39
Fórum: MiniGui
Tópico: pipininhos na rotina devido aos CHs
Respostas: 24
Exibições: 3930

pipininhos na rotina devido aos CHs

... APP_DLG_HEIGHT, cTitle,,,.T. )

DEFINE MAIN MENU OF ( xDlg )
FOR EACH aGroupList IN aMenuList
DEFINE POPUP "Data" + Ltrim( Str( aGroupList:__EnumIndex ) )
FOR EACH cDBF IN aGroupList
MENUITEM cDBF ACTION frm_funcMain( cDBF, aAllSetup ) ICON "ICOWINDOW"
NEXT
END POPUP
NEXT
END MENU

gui ...
por JoséQuintas
15 Mai 2025 14:41
Fórum: FiveWin
Tópico: Novo mingw 15.1
Respostas: 52
Exibições: 5653

Novo mingw 15.1

... function(s): MessageBox(),
i18n(), HGetCaseMatch(), ANSIToWide(), HexToNum(), WideToANSI(),
RAScan(), HHasKey(), SToT(), ValToPrgExp(), hb_enumIndex(),
hb_regexReplace(), hb_Exec(), DateTime(), AtSkipStrings(), TToS(),
WildMatch(), hb_Decode(), HMerge(), HSetCaseMatch(), Notify(),
HexToStr ...
por JoséQuintas
08 Mai 2025 12:18
Fórum: HwGui
Tópico: Exemplo de lenta
Respostas: 10
Exibições: 1596

Exemplo de lenta

... Nil

STATIC FUNCTION LentaClick( oLenta, aPanelList )

LOCAL oChild

IF ! Empty( aPanelList )
FOR EACH oChild IN aPanelList
IF oChild:__EnumIndex() == oLenta:Value
oChild:Show()
ELSE
oChild:Hide()
ENDIF
NEXT
ENDIF

RETURN .T.

STATIC FUNCTION LentaStyles( aPanelList )

LOCAL nIndex ...
por JoséQuintas
07 Mai 2025 21:01
Fórum: HwGui
Tópico: Exemplo de lenta
Respostas: 10
Exibições: 1596

Exemplo de lenta

... abas

STATIC FUNCTION LentaClick( oLenta, aChildList )

LOCAL oChild

IF ! Empty( aChildList )
FOR EACH oChild IN aChildList
IF oChild:__EnumIndex() == oLenta:Value
oChild:Show()
ELSE
oChild:Hide()
ENDIF
NEXT
ENDIF

RETURN .T.


Style pra cada coluna, sei lá quantas

STATIC FUNCTION ...
por JoséQuintas
07 Mai 2025 07:09
Fórum: HwGui
Tópico: Como pegar coluna do browse
Respostas: 16
Exibições: 3204

Como pegar coluna do browse

... FUNCTION Browse3()

LOCAL oBrw3, aRow, aCol
LOCAL aList := Array(10,10)

FOR EACH aRow IN aList
FOR EACH aCol IN aRow
aCol := Str( aRow:__EnumIndex(), 3 ) + "." + Str( aCol:__EnumIndex(), 3 )
NEXT
NEXT

@ 500, 20 BROWSE oBrw3 ;
ARRAY ;
SIZE 280, 300 ;
STYLE WS_BORDER + WS_VSCROLL + WS ...
por JoséQuintas
06 Mai 2025 22:08
Fórum: HwGui
Tópico: Como pegar coluna do browse
Respostas: 16
Exibições: 3204

Como pegar coluna do browse

... again for storage after editing)
*/
aBrowseList := Array(10,10)
FOR EACH aRow IN aBrowseList
FOR EACH aCol IN aRow
aCol := Ltrim( Str( aCol:__EnumIndex() ) ) + "." + Ltrim( Str( aCol:__EnumIndex() ) )
NEXT
NEXT

IF lWithDialog
INIT DIALOG oDlg ;
TITLE "demobrowsearr.prg - Browse Array" ;
AT ...
por JoséQuintas
06 Mai 2025 22:04
Fórum: HwGui
Tópico: Como pegar coluna do browse
Respostas: 16
Exibições: 3204

Como pegar coluna do browse

... não é.


//hwg_CREATEARLIST( oBrowse, aBrowseList )

oBrowse:aArray := aBrowseList
FOR EACH oCol IN aBrowseList[1]
FOR EACH nTmp IN { oCol:__EnumIndex() }
oBrowse:AddColumn( HColumn():New( Ltrim(Str(nTmp, 5)),{|v,o|(v),o:aArray[o:nCurrent,nTmp]},"C",10,0,.F.,DT_CENTER ) )
NEXT
NEXT ...
por JoséQuintas
06 Mai 2025 18:59
Fórum: HwGui
Tópico: Como pegar coluna do browse
Respostas: 16
Exibições: 3204

Como pegar coluna do browse

... que quiser pra linhas e colunas

aBrowseList := Array(10,10)
FOR EACH aRow IN aBrowseList
FOR EACH aCol IN aRow
aCol := Ltrim( Str( aRow:__EnumIndex() ) ) + "." + Ltrim( Str( aCol:__EnumIndex() ) )
NEXT
NEXT


Mas tem o título....

hwg_CREATEARLIST( oBrowse, aBrowseList )
FOR EACH oCol ...
por Itamar M. Lins Jr.
25 Mar 2025 15:06
Fórum: [x]Harbour
Tópico: PROBLEMAS AO CONVERTER HB_BASE64 UTF8 UTF-8
Respostas: 14
Exibições: 3309

PROBLEMAS AO CONVERTER HB_BASE64 UTF8 UTF-8

... pragma __text|<v>+=%s+hb_eol();<v>:=""

/* SWITCH ... ; case ... ; DEFAULT ; ... ; END */
#xcommand DEFAULT => OTHERWISE

/* FOR EACH hb_enumIndex() */
#xtranslate hb_enumIndex( <!v!> ) => <v>:__enumIndex()

/* TRY / CATCH / FINALLY / END */
#xcommand TRY => BEGIN SEQUENCE WITH ...