Page 1 of 1
Twbrowse skipper tdata
Posted: Mon Jun 12, 2017 1:08 pm
by norberto
HI, i have a old appl, i try compile with fwh17.04 and my twbrowse is empty, without records, i use twbrowse, tdata (from james), something is changed ? i dont change the code of this appl for years.
this code Works or something is changed:
oLbx:bSkip := { | nRecs | oCCBA:skipper( nRecs ) }
thanks
Re: Twbrowse skipper tdata
Posted: Mon Jun 12, 2017 4:02 pm
by James Bott
Norberto,
TData inherits the skipper() method from TDatabase (it doesn't have one of it's own), so any changes would have been in TDatabase. I haven't use TWBrowse in years so I haven't noticed your problem.
Do you know what version your app was previously compiled with when it was working?
James
Re: Twbrowse skipper tdata
Posted: Mon Jun 12, 2017 4:12 pm
by Rick Lipkin
Norberto
Here is some ListBox code I used before xBrowse and ADO ... and not tData .. I don't know if this code will help you ?? I have included the Skipper function as well.
Rick Lipkin
Code: Select all
@ 0,0 LISTBOX oBrw FIELDS ;
oRs:Fields("novellid"):Value,;
substr( trim(oRs:Fields("lname"):Value)+", "+oRs:Fields("fname"):Value+SPACE(15),1,30),;
oRs:Fields("progid"):Value,;
oRs:Fields("read"):Value,;
oRs:Fields("write"):Value,;
oRs:Fields("super"):Value,;
oRs:Fields("salaried"):Value,;
oRs:Fields("empstat"):Value,;
oRs:Fields("defloc"):Value,;
oRs:Fields("defprg"):Value,;
oRs:Fields("defact"):Value;
SIZES 90,195,90,31,31,31,31,31,40,40,40;
HEADERS "UserID", ;
"Name",;
"ProgID",;
"Rd",;
"Ed",;
"Sup",;
"Sal",;
"St",;
"Loc",;
"Prog",;
"Act";
ON DBLCLICK( _EmpView( "V", oRs ) );
UPDATE
oBrw:bLogicLen := { || oRs:RecordCount }
oBrw:bGoTop := { || oRs:MoveFirst() }
oBrw:bGoBottom := { || oRs:MoveLast() }
oBrw:bSkip := { | nSkip | Skipper( oRs, nSkip ) } // <---- skipper call
oBrw:cAlias := "ARRAY"
//-------------------------------
STATIC FUNCTION SKIPPER( oRsx, nSkip )
LOCAL nRec := oRsx:AbsolutePosition
oRsx:Move( nSkip )
IF oRsx:EOF; oRsx:MoveLast(); ENDIF
IF oRsx:BOF; oRsx:MoveFirst(); ENDIF
RETURN( oRsx:AbsolutePosition - nRec )
Re: Twbrowse skipper tdata
Posted: Mon Jun 12, 2017 4:57 pm
by James Bott
Norberto,
Try using your database with fwh\samples\testbrw.prg and see if that is working.
Possibly your program is working but showing an unexpected result, i.e. there is a filter that filters out all the data.
Let us know what you find.
Regards,
James