Instance variable question....
Brian Brown
rbb at techgame.net
Wed Mar 19 08:40:09 UTC 2003
Greetings!
I'm playing with a Morph copied from IconicButton that displays an
MPEGDisplayMorph instead of a Form as it's graphic. The idea is to be able to
start and stop the movie by clicking the button. I have it *mostly* working, but
I wanted to something like the following as my actionSelector:
playToggle
"Toggle the movie playing"
(theMovie running)
ifFalse: [theMovie startPlaying.]
ifTrue: [theMovie stopPlaying.]
theMovie is an instance variable that points to my MPEGDisplayMorph; if I
instantiate one of these "MovieButton" objects, I can start and stop the movie
by evaluating:
buttonInstance target startPlaying
but trying to call playToggle or even trying to evaluate the instance variable:
running (part of MPEGDisplayMorph) gives a message not understood. Am I simply
not accessing or evaluating that instance variable correctly?
thanks!
Brian
More information about the Squeak-dev
mailing list
|