Hi all, I've been stuck for a couple of days on trying to figure out how to properly set the target and setValueSelector of a SimpleSliderMorph. My intended target is an instance of a class that I created in the workspace and I assume the setValueSelector is what I use to send the value to a method in my instance of the class.
si := SecondaryCoil. "make an instance of the class" si setTurns:10."set the turns to 10" Transcript show:getTurns."print the turns"
The above code works in the workspace and transcript, but I cannot figure out how to point the SimpleSliderMorph target to my instance si. Tried all kind of combinations with no luck.
I'd like to be able to use the slider to set the turns of the coil in my instance of SecondaryCoil.
I have 4 books on Squeak but I must me missing something obvious here.
Tim
On Friday 21 Nov 2008 7:04:21 am Tim Patti wrote:
The above code works in the workspace and transcript, but I cannot figure out how to point the SimpleSliderMorph target to my instance si. Tried all kind of combinations with no luck
Turn on "create textual references to dropped morphs" in workspace titlebar menu and drop the morph into the workspace to paste a text reference.
HTH .. Subbu
Thanks to all who replied to my SimpleSliderMorph question.
I was trying to set the target with the the inspector window as a quick way to test my program. Got things working now, thanks!
Tim
________________________________
beginners@lists.squeakfoundation.org