TxBrowse fails on method :bKeyDown()

TxBrowse fails on method :bKeyDown()

Postby JC » Wed Mar 19, 2008 2:51 pm

Hi my friends..

I have this situation when I execute a Enter key press:

Code: Select all  Expand view
oBrw:bKeyDown( {|nKey| if( nKey == VK_RETURN, oButtons[2]:click(), ) } )


The code of oButtons[2]:click() opens a dialog from my resource... It's works fine, except for one problem.... the code opens the window twice.

However, I'm running only once!

Where I'm wrong??
Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
User avatar
JC
 
Posts: 445
Joined: Thu Feb 21, 2008 11:58 am
Location: Brazil

Postby JC » Wed Mar 19, 2008 7:11 pm

I'm note one thing in the method KeyDown()...

Code: Select all  Expand view
METHOD KeyDown( nKey, nFlags ) CLASS TXBrowse

   if ::bKeyDown != nil
      Eval( ::bKeyDown, nKey, nFlags )
   endif

   do case

   ...

   otherwise
         return Super:KeyDown( nKey, nFlags )

   endcase


It's execute a block code bKeydown twice!
Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
User avatar
JC
 
Posts: 445
Joined: Thu Feb 21, 2008 11:58 am
Location: Brazil

Postby nageswaragunupudi » Thu Mar 20, 2008 12:18 am

Mr JC

I tried with oBrw:bKeyDown := { |n| If( n == 13, MsgInfo( "space" ), ) }
It executes only once.

Method KeyDown: Method Keydown of TXBrowse does not evaluate bKeyDown at all.

Method KeyChar evaluates bKeyChar in the beginning.

But when i tried oBrw:bKeyChar := { |n| If( n == 13, MsgInfo( "space" ), ) }, even then it executed only once.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10624
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 73 guests