Page 1 of 1

eval error

Posted: Wed Jul 30, 2008 7:56 pm
by Silvio
On mine class I create LButtonUp( nRow, nCol, nKeyFlags ) method to click a graphics .

it make error on eval
Error description: Error BASE/1004 Class: 'LOGICAL' has no exported method: EVAL


Code: Select all | Expand

METHOD LButtonUp( nRow, nCol, nKeyFlags ) CLASS myclass
::lPressed := .f.

if ::lCaptured
   ::lCaptured := .f.
   ReleaseCapture()
   ::Refresh(.f.)

   if ::lButton
      if ::bAction != nil
       [b] Eval( ::bAction)  /////////---> error why ???[/b]      endif
      ::lOver := .f.
      ::Refresh(.f.)
   endif
endif

return super: LButtonUp( nRow, nCol, nKeyFlags )




on the command of the control I write
@ x,y myclass ... action msginfo("myclass")

where is the error ?

Posted: Wed Jul 30, 2008 9:03 pm
by Antonio Linares
Silvio,

::bAction contains a logical value instead of a codeblock :-)

Posted: Thu Jul 31, 2008 1:24 pm
by Silvio
Right!
baction is .t. or .f.
but how i make to give to it to run an action , i ask to U this because i am in holydays 's home i not have with me my helps manual and the sources fwh class and I not remember how , perhaps today it is vey sunny day or i have confusion in my mind.
I' m writing to U from beach with my htc tynt II wm6.

Posted: Thu Jul 31, 2008 1:27 pm
by Antonio Linares
Silvio,

{ || .T. }

?

Posted: Fri Aug 01, 2008 10:32 am
by Silvio
no i made it right .
Now i resolve only on ch command i made an mistake..
Now the class run ok ...thanks antonio.