xbrowse : Keydown()

xbrowse : Keydown()

Postby demont frank » Mon Jun 18, 2007 9:43 am

Hello,

In mine aplication , i have :

oBrw:bkeyDown := {||....}

So , i try to trigger an action for nkey 32 or 13

The problem is that in method keydown , this action is executed twice :

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

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

   do case
   case nKey == VK_UP // and other keys
       .......
   otherwise
        return Super:KeyDown( nKey, nFlags )
   endcase

return 0



Super:Keydown() executes also ::bKeydown

I had to change it

if ::bKeyDown = nil
return Super:KeyDown( nKey, nFlags )
end

Am i missing something ?

Frank
demont frank
 
Posts: 167
Joined: Thu Mar 22, 2007 11:24 am

Postby demont frank » Mon Jun 18, 2007 10:33 am

I am sorry , but i saw :

* Fix: Class TXBrowse Method KeyDown() was evaluating bKeyDown twice. Now it is ok.

How is the method changed ?

Frank
demont frank
 
Posts: 167
Joined: Thu Mar 22, 2007 11:24 am

Postby Antonio Linares » Mon Jun 18, 2007 11:04 am

Frank,

Please remove these three lines:
Code: Select all  Expand view
   if ::bKeyDown != nil
      Eval( ::bKeyDown, nKey, nFlags )
   endif
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42078
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 50 guests