Twbrowse skipper tdata

Twbrowse skipper tdata

Postby norberto » Mon Jun 12, 2017 1:08 pm

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
norberto
 
Posts: 566
Joined: Thu Aug 30, 2007 3:40 pm
Location: BR

Re: Twbrowse skipper tdata

Postby James Bott » Mon Jun 12, 2017 4:02 pm

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

Re: Twbrowse skipper tdata

Postby Rick Lipkin » Mon Jun 12, 2017 4:12 pm

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  Expand view  RUN

@ 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
Rick Lipkin
 
Posts: 2666
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Twbrowse skipper tdata

Postby James Bott » Mon Jun 12, 2017 4:57 pm

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 46 guests