Petro Bochan wrote:
Hello,
In this behavior:
property aSprite property aValue
on beginSprite me set the aSprite of me to sprite the spriteNum of me set the aValue of me to 9 end beginSprite
on doSomething me set the aValue of me to the -aValue of me end doSomething
------ using verbose syntax I'm trying to set property variable aValue to a negative meaning. I know I can do this like "set the aValue to -9" or "aValue = -aValue", but I want it the way this is done in doSomething handler. Director complains saying "Expected end of statement". I played around with the brackets but to no result. Is there a workaround about this?
........My test (MX, Mac)........
in a parent script named 'bar':
property pFoo
on new me return me end
on setme me, arg pFoo = arg end
on test me put "pFoo",pFoo put "-pFoo",-pFoo put "me.pFoo",me.pFoo put "-me.pFoo",-me.pFoo put "-(me.pFoo)",-(me.pFoo) put "the pFoo of me", the pFoo of me put "-the pFoo of me", -the pFoo of me put "-(the pFoo of me)", -(the pFoo of me) end
In the message window:
boo = new(script "bar")
boo.setme(7)
boo.test() -- "pFoo" 7 -- "-pFoo" -7 -- "me.pFoo" 7 -- "-me.pFoo" -7 -- "-(me.pFoo)" -7 -- "the pFoo of me" 7 -- "-the pFoo of me" -7 -- "-(the pFoo of me)" -7
boo.setme(-1234567)
boo.test() -- "pFoo" -1234567 -- "-pFoo" 1234567 -- "me.pFoo" -1234567 -- "-me.pFoo" 1234567 -- "-(me.pFoo)" 1234567 -- "the pFoo of me" -1234567 -- "-the pFoo of me" 1234567 -- "-(the pFoo of me)" 1234567
--
Carl West mailto:[EMAIL PROTECTED] http://carl.west.home.comcast.net
[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]