Error command On Key

Moderator: Rathinagiri

Post Reply
User avatar
pctoledo
Posts: 123
Joined: Wed Aug 25, 2010 10:45 am
Location: Araçatuba - SP - Brazil
Has thanked: 3 times
Been thanked: 7 times
Contact:

Error command On Key

Post by pctoledo » Thu Aug 04, 2011 2:09 pm

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"
Regards/Saludos,

Toledo

Clipper On Line

User avatar
concentra
Posts: 256
Joined: Fri Nov 26, 2010 11:31 am
Location: Piracicaba - Brasil

Post by concentra » Fri Aug 05, 2011 11:27 am

Hi Toledo.

I compiled your sample and it's Ok here...
Are you using the current SVN ?
[[]] Mauricio Ventura Faria

Carlos Britos
Posts: 220
Joined: Sat Aug 02, 2008 5:03 pm
Has thanked: 6 times
Been thanked: 2 times

Post by Carlos Britos » Fri Aug 05, 2011 1:40 pm

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.
Regards/Saludos, Carlos (bcd12a)

User avatar
pctoledo
Posts: 123
Joined: Wed Aug 25, 2010 10:45 am
Location: Araçatuba - SP - Brazil
Has thanked: 3 times
Been thanked: 7 times
Contact:

Post by pctoledo » Sat Aug 06, 2011 12:55 pm

concentra wrote:Are you using the current SVN ?
Yes, now updated the current SVN and the problem continues!
Regards/Saludos,

Toledo

Clipper On Line

User avatar
pctoledo
Posts: 123
Joined: Wed Aug 25, 2010 10:45 am
Location: Araçatuba - SP - Brazil
Has thanked: 3 times
Been thanked: 7 times
Contact:

Post by pctoledo » Mon Aug 22, 2011 8:17 pm

Friends, now updated the current SVN and the problem resolved!
Regards/Saludos,

Toledo

Clipper On Line

Post Reply