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

Error command On Key

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

Toledo

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

Re: Error command On Key

Post by concentra »

Hi Toledo.

I compiled your sample and it's Ok here...
Are you using the current SVN ?
[[]] Mauricio Ventura Faria
Carlos Britos
Posts: 245
Joined: Sat Aug 02, 2008 5:03 pm

Re: Error command On Key

Post 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.
Regards/Saludos, Carlos (bcd12a)
User avatar
pctoledo
Posts: 123
Joined: Wed Aug 25, 2010 10:45 am
Location: Araçatuba - SP - Brazil
Contact:

Re: Error command On Key

Post by pctoledo »

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

Re: Error command On Key

Post by pctoledo »

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

Toledo

Clipper On Line
Post Reply