Error within BASIC class, New() method

Moderator: Rathinagiri

User avatar
concentra
Posts: 256
Joined: Fri Nov 26, 2010 11:31 am
Location: Piracicaba - Brasil

Re: Error within BASIC class, New() method

Post by concentra » Fri Sep 23, 2011 7:24 pm

Hi Rathinagiri.
I think this is for you...
In VirtualGrid, how do I access the record number of the current line while browsing a database ?
It may sound too basic but I couldn't figure how...
[[]] Mauricio Ventura Faria

mrduck
Posts: 497
Joined: Fri Sep 10, 2010 5:22 pm

Post by mrduck » Fri Sep 23, 2011 7:32 pm

concentra wrote:Hi Rathinagiri.
I think this is for you...
In VirtualGrid, how do I access the record number of the current line while browsing a database ?
It may sound too basic but I couldn't figure how...

browse:value


absolutely DO NOT use recno()

mrduck
Posts: 497
Joined: Fri Sep 10, 2010 5:22 pm

Post by mrduck » Sat Sep 24, 2011 7:06 am

mrduck wrote:Mauricio,
I have a set of commits to make, one solves this problem. DoKeyboardEvent in a point returns .T., change to .F.

An event that returns .T. stops the "event train", it means Qt doesn't handle the event... with .F. Qt handles the event...

In HMG4 Changelog this is described

Mauricio,
please update

PLEASE read the changelog and look at the following code snippet!

in your sample code, change the function:

Code: Select all


/***********************************/
STATIC FUNCTION CallDialog()
/***********************************/

   LOCAL oDlg
   LOCAL oButtonBox
   LOCAL i

   WITH OBJECT oDlg := Dialog():New( "odlg" )
      :Width   := 200
      :Center()

      WITH OBJECT oButtonBox  := ButtonBox():New("oButtonBox")
         :addButton( BUTTON_OK    ,, { || oDlg:Accept() } )
         :addButton( BUTTON_CANCEL,, { || oDlg:Reject() } )
         :addButton( "6",BUTTON_ROLE_Action, { || oDlg:done(6) } )
      END WITH

   END WITH

   i := oDlg:Activate()

   msgInfo( "Accepted: "+iif( oDlg:Accepted(), "TRUE","FALSE" )+"<br>Rejected: "+iif( oDlg:rejected(), "TRUE", "FALSE")+"<br>Return value:"+hb_valtoexp( i ) )


RETURN NIL


Post Reply