I cannot run this example in fwh:
#include "FiveWin.ch"
//----------------------------------------------------------------------------//
function Main()
local oDlg, oBrw
local aData := { { "1", "Cliente", "=", "123456" },;
{ "2", "Direccion", "$", "Spain" },;
{ "3", "Telefono", "<>", "889977665" } }
DEFINE DIALOG oDlg FROM 0, 0 TO 30, 100
@ 1, 1 LISTBOX oBrw FIELDS aData[ oBrw:nAt ][ 1 ],;
aData[ oBrw:nAt ][ 2 ],;
aData[ oBrw:nAt ][ 3 ],;
aData[ oBrw:nAt ][ 4 ] OF oDlg ;
SIZE 150, 100
oBrw:SetArray( aData )
@ 9 , 9 BUTTON "&End" OF oDlg ACTION oDlg:End()
ACTIVATE DIALOG oDlg CENTERED
any help?
Piscicelli/Zingoni
Bug report on listbox
-
- Posts: 76
- Joined: Wed Oct 12, 2005 5:52 pm
- Location: Milan,Italy
For Antonio:
This problem is for the incorrect initialization of ::aHeaders into WBrowse Class!
I suggest this:
at line 1184:
and at line 1824:
This problem is for the incorrect initialization of ::aHeaders into WBrowse Class!
I suggest this:
at line 1184:
Code: Select all
if Len( ::aHeaders ) < nElements
if ::Cargo == nil
::aHeaders = Array( nElements )
IF Upper( ::cAlias ) != "ARRAY"
for n = 1 to nElements
::aHeaders[ n ] = ( cAlias )->( FieldName( n ) )
next
ELSE
::aHeaders := AFill( ::aHeaders, "" )
ENDIF
else
::aHeaders = { "" }
endif
endif
Code: Select all
if ! Empty( ::cAlias ) .and. Upper( ::cAlias ) != "ARRAY" // aggiunto da Ugo il 22/03/04
::bGoTop = If( uVal1 != nil, { || ( ::cAlias )->( DbSeek( uVal1, .t. ) ) },;
{ || ( ::cAlias )->( DbGoTop() ) } )
::bGoBottom = If( uVal2 != nil, { || ( ::cAlias )->( BrwGoBottom( uVal2 ) ) },;
{ || ( ::cAlias )->( DbGoBottom() ) } )
::bSkip = If( uVal1 != nil, BuildSkip( ::cAlias, cField, uVal1, uVal2 ),;
{ | n | ( ::cAlias )->( _DbSkipper( n ) ) } )
::bLogicLen = If( uVal1 != nil,;
{ || ( ::cAlias )->( Self:RecCount( uVal1 ) ) },;
{ || ( ::cAlias )->( RecCount() ) } )
::nLen = Eval( ::bLogicLen, Self )
::lHitTop = .f.
::lHitBottom = .f.
if uVal1 != nil
Eval( ::bGoTop, Self )
endif
else
::bLogiclen = { || 0 }
endif
Ciao, best regards,
Ugo
Ugo
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Ugo,
This way we have a number for each column:
This way we have a number for each column:
Code: Select all
if Len( ::aHeaders ) < nElements
if ::Cargo == nil
::aHeaders = Array( nElements )
for n = 1 to nElements
if ! Empty( cAlias ) .and. Upper( cAlias ) != "ARRAY"
::aHeaders[ n ] = ( cAlias )->( FieldName( n ) )
else
::aHeaders[ n ] = AllTrim( Str( n ) )
endif
next
else
::aHeaders = { "" }
endif
endif