SimpleSliderMorph target setting question.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

SimpleSliderMorph target setting question.

Tim Patti
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



_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: SimpleSliderMorph target setting question.

K. K. Subramaniam
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
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: SimpleSliderMorph target setting question.

Tim Patti
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 mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners