Page 2 of 2

Re: Error within BASIC class, New() method

Posted: Fri Sep 23, 2011 7:24 pm
by concentra
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...

Re: Error within BASIC class, New() method

Posted: Fri Sep 23, 2011 7:32 pm
by mrduck
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()

Re: Error within BASIC class, New() method

Posted: Sat Sep 24, 2011 7:06 am
by mrduck
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