TxBrowse fails on method :bKeyDown()

Post Reply
User avatar
JC
Posts: 445
Joined: Thu Feb 21, 2008 11:58 am
Location: Brazil
Contact:

TxBrowse fails on method :bKeyDown()

Post by JC »

Hi my friends..

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

Code: Select all

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
Contact:

Post by JC »

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

Code: Select all

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
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Post by nageswaragunupudi »

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