Twbrowse skipper tdata

Post Reply
norberto
Posts: 566
Joined: Thu Aug 30, 2007 3:40 pm
Location: BR

Twbrowse skipper tdata

Post 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
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: Twbrowse skipper tdata

Post 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
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
Rick Lipkin
Posts: 2397
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Twbrowse skipper tdata

Post 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 )


 
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: Twbrowse skipper tdata

Post 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
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Post Reply