[Squeakland] 1 script -> N objs

Randy Heiland heiland at indiana.edu
Tue Feb 22 18:54:56 PST 2005


Thanks for both your replies.  I failed to communicate exactly what I wanted
to do.  I see that both your techniques do indeed impart a given script to
another object.  However, what I'm looking for is a simple way to execute a
single script and have it act on N (sibling) objects (where N can be large).
Basically, I want to reproduce the behavior of the StarSqueak objects (e.g.
slimemold).  Related, is the "proper" way to easily generate N sibling
objects to create a script with misc: Sketch look like Sketch's copy ?

--Randy


> -----Original Message-----
> From: squeakland-bounces at squeakland.org [mailto:squeakland-
> bounces at squeakland.org] On Behalf Of Scott Wallace
> Sent: Monday, February 21, 2005 9:36 PM
> To: squeakland at squeakland.org
> Subject: Re: [Squeakland] 1 script -> N objs
> 
> Additionally, there is a (little-known) way that you can "impart",
> i.e. copy, all the scripts of a scripted Sketch over to a different
> Sketch.
> 
> To do this, open up a viewer on the first Sketch, the one that has
> scripts you want to copy.  In the main Viewer menu, choose "impart
> scripts to..." from the "more..." branch.  Now you'll be given a
> cross-hair cursor, which invites you to click on the object to which
> you wish to impart the first object's scripts.
> 
> After you've clicked on the second Sketch, open up a Viewer on it,
> and you should find that that it now has its own copies of all the
> scripts of the first Sketch.
> 
> Cheers,
> 
>    -- Scott
> 
> At 4:02 PM -0800 2/21/05, Ned Konz wrote:
> >On Saturday 19 February 2005 2:06 pm, Randy Heiland wrote:
> >>  How do I have 1 script get applied to multiple objects in E-toys?
> >
> >What do you mean "applied"?
> >
> >If they're the same kind of objects, then you can share a script between
> >multiple 'siblings'.
> >
> >This should work more or less automatically in the current version of the
> >Squeakland image.
> >
> >If you take an object, then add a script or instance variable, then
> duplicate
> >it using the green halo handle, you will make a sibling instance that
> will
> >share all the scripts of (and will have the same instance variables as)
> the
> >original.
> _______________________________________________
> Squeakland mailing list
> Squeakland at squeakland.org
> http://squeakland.org/mailman/listinfo/squeakland
> 




More information about the Squeakland mailing list