The scripts, converted to code, kind of look like like methods.
What are the relationship of scripts and methods? Are scripts instance level methods? I see two possible implementations for this: - the eToys objects could have a system dictionary of methods as an instance value? - eToys objects could be singletons of a new class created on the fly? Or are scripts code blocks associated with the instance in some other way? - Steinar _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
On 08.04.2009, at 20:28, Steinar Bang wrote: > The scripts, converted to code, kind of look like like methods. > > What are the relationship of scripts and methods? Are scripts > instance > level methods? Yes. > I see two possible implementations for this: > - the eToys objects could have a system dictionary of methods as an > instance value? > - eToys objects could be singletons of a new class created on the fly? The latter. They are instances of subclasses of class Player. Usually they are singletons, unless you create "siblings" which are instances of the same class and so share all scripts. You can actually see the scripts in the class browser (although there was a bug so that script methods did not show up properly, fixed in update #2210 scriptCatFix-sw). > Or are scripts code blocks associated with the instance in some other > way? Nope. - Bert - _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
In reply to this post by Steinar Bang
Are you familiar with the "halos" ?
If not : Create a script, MMB for halos on the ScriptEditorMorph that has been created, LMB on the 'debug' icon, choose browse morph class. Repeatedly MMB on the 'clock' icon on the ScriptEditorMorph, till it says ScriptStatusControl on the bottom, then browse that morph class. Mike On 4/8/09, Steinar Bang <[hidden email]> wrote: > The scripts, converted to code, kind of look like like methods. > > What are the relationship of scripts and methods? Are scripts instance > level methods? I see two possible implementations for this: > - the eToys objects could have a system dictionary of methods as an > instance value? > - eToys objects could be singletons of a new class created on the fly? > > Or are scripts code blocks associated with the instance in some other > way? > > > - Steinar > > _______________________________________________ > Beginners mailing list > [hidden email] > http://lists.squeakfoundation.org/mailman/listinfo/beginners > Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
On 08.04.2009, at 22:10, Mike Stramba wrote: > Are you familiar with the "halos" ? > > If not : > Create a script, MMB for halos on the ScriptEditorMorph that has been > created, LMB on the 'debug' icon, choose browse morph class. The debug halo handle is not shown in etoyFriendly mode, which is default in the Etoys image. - Bert - > Repeatedly MMB on the 'clock' icon on the ScriptEditorMorph, till it > says ScriptStatusControl on the bottom, then browse that morph class. > > Mike > > On 4/8/09, Steinar Bang <[hidden email]> wrote: >> The scripts, converted to code, kind of look like like methods. >> >> What are the relationship of scripts and methods? Are scripts >> instance >> level methods? I see two possible implementations for this: >> - the eToys objects could have a system dictionary of methods as an >> instance value? >> - eToys objects could be singletons of a new class created on the >> fly? >> >> Or are scripts code blocks associated with the instance in some other >> way? >> >> >> - Steinar >> >> _______________________________________________ >> Beginners mailing list >> [hidden email] >> http://lists.squeakfoundation.org/mailman/listinfo/beginners >> > _______________________________________________ > Beginners mailing list > [hidden email] > http://lists.squeakfoundation.org/mailman/listinfo/beginners _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
Free forum by Nabble | Edit this page |