FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour TxBrowse fails on method :bKeyDown()
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
TxBrowse fails on method :bKeyDown()
Posted: Wed Mar 19, 2008 02:51 PM
Hi my friends..

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

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
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
TxBrowse fails on method :bKeyDown()
Posted: Wed Mar 19, 2008 07:11 PM
I'm note one thing in the method KeyDown()...

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
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
TxBrowse fails on method :bKeyDown()
Posted: 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

Continue the discussion