Page 1 of 1

Error command On Key

Posted: Thu Aug 04, 2011 2:09 pm
by pctoledo
Friends, I am having problems with Command On Key.

Code: Select all

#include "hbqtgui.ch"
#include "hmg.ch"
#include "i_keybd.ch"

FUNCTION Main

   LOCAL oWindow, oButton1

   HbQt_ErrorSys()

   WITH OBJECT oWindow := Window():New()
      :Row      := 10
      :Col      := 10
      :Width    := 400
      :Height   := 400
      :Title    := 'Nice OOP Demo!!!'
      :Type     := WND_MAIN
      :OnInit   := { || oWindow:Center() }

      WITH OBJECT oButton1 := Button():New("oButton1")
         :Row     := 40
         :Col     := 40
         :Width   := 180
         :Caption := 'Close Window'
         :OnClick := { || oWindow:Release() }
      END WITH

   END WITH

   On key ESCAPE of oWindow Action oWindow:Release()

   oWindow:Activate()

   RETURN NIL
If I use the button to close the window, it works fine. But if you press ESC, it gives the error message: "demo_onkey.exe has encountered a problem and needs to close"

Re: Error command On Key

Posted: Fri Aug 05, 2011 11:27 am
by concentra
Hi Toledo.

I compiled your sample and it's Ok here...
Are you using the current SVN ?

Re: Error command On Key

Posted: Fri Aug 05, 2011 1:40 pm
by Carlos Britos
concentra wrote:Hi Toledo.

I compiled your sample and it's Ok here...
Are you using the current SVN ?
Hi
Is strange because I can confirm the Toledo report here. :shock:
I'll check Release method.

Re: Error command On Key

Posted: Sat Aug 06, 2011 12:55 pm
by pctoledo
concentra wrote:Are you using the current SVN ?
Yes, now updated the current SVN and the problem continues!

Re: Error command On Key

Posted: Mon Aug 22, 2011 8:17 pm
by pctoledo
Friends, now updated the current SVN and the problem resolved!