group objects

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

group objects

Randy Heiland
Apologies if I've asked this in the past and forgot... am I able to  
group/join together multiple objects into a composite object?
I'd like to:
  - paint a fat line
  - script to:  rotate it and make copies
  - treat all lines as a single object

thanks, Randy
_______________________________________________
Squeakland mailing list
[hidden email]
http://squeakland.org/mailman/listinfo/squeakland
Reply | Threaded
Open this post in threaded view
|

Re: group objects

Bert Freudenberg
On Mar 10, 2007, at 2:40 , Randy Heiland wrote:

> Apologies if I've asked this in the past and forgot... am I able to
> group/join together multiple objects into a composite object?

Sure, "embed" them into one "container" object. That can be any  
object, like a Rectangle, or an Ellipse may look nice, or just make  
it transparent.

> I'd like to:
>   - paint a fat line
>   - script to:  rotate it and make copies
>   - treat all lines as a single object

Make a Rectangle. Draw the fat line on top of it. From the Line's  
halo menu choose "embed into ... Rectangle". Now when grabbing the  
rectangle, the line moves with it. Then make a script like "Line  
turnBy: 30. Rectangle include: Line's copy." and you're fine to go.

- Bert -


_______________________________________________
Squeakland mailing list
[hidden email]
http://squeakland.org/mailman/listinfo/squeakland
Reply | Threaded
Open this post in threaded view
|

Re: group objects

Randy Heiland
Thanks Bert.  Ah yes, it's coming back to me.  However, don't I need  
to use a Playfield as my "container" object?  I followed your  
instructions - drawing a rectangle and embedding my line into it.  
But then I couldn't find a "rectangle include" tile in any of the  
categories - is it there and I just missed it?  In a playfield, it's  
in the Collections category.


On Mar 10, 2007, at 3:45 AM, Bert Freudenberg wrote:

> On Mar 10, 2007, at 2:40 , Randy Heiland wrote:
>
>> Apologies if I've asked this in the past and forgot... am I able to
>> group/join together multiple objects into a composite object?
>
> Sure, "embed" them into one "container" object. That can be any  
> object, like a Rectangle, or an Ellipse may look nice, or just make  
> it transparent.
>
>> I'd like to:
>>   - paint a fat line
>>   - script to:  rotate it and make copies
>>   - treat all lines as a single object
>
> Make a Rectangle. Draw the fat line on top of it. From the Line's  
> halo menu choose "embed into ... Rectangle". Now when grabbing the  
> rectangle, the line moves with it. Then make a script like "Line  
> turnBy: 30. Rectangle include: Line's copy." and you're fine to go.
>
> - Bert -
>
>

_______________________________________________
Squeakland mailing list
[hidden email]
http://squeakland.org/mailman/listinfo/squeakland
Reply | Threaded
Open this post in threaded view
|

Re: group objects

Randy Heiland
In reply to this post by Bert Freudenberg
I'm posting to my earlier reply that hasn't appeared yet...  
unfortunately, just embedding a copy of the line into a playfield  
doesn't accomplish what I want either, i.e., it doesn't give me a  
single composited object.

Here's a concrete example that I'd love for someone to explain how to  
accomplish in Squeak (it goes back to my desire to do a project  
involving symmetries):
  - paint 1/6 of a snowflake
  - rotate it, make a copy, and "embed" into "snowflake" object
  - repeat
  Once you have a complete snowflake, write scripts for it.

On Mar 10, 2007, at 3:45 AM, Bert Freudenberg wrote:

> On Mar 10, 2007, at 2:40 , Randy Heiland wrote:
>
>> Apologies if I've asked this in the past and forgot... am I able to
>> group/join together multiple objects into a composite object?
>
> Sure, "embed" them into one "container" object. That can be any  
> object, like a Rectangle, or an Ellipse may look nice, or just make  
> it transparent.
>
>> I'd like to:
>>   - paint a fat line
>>   - script to:  rotate it and make copies
>>   - treat all lines as a single object
>
> Make a Rectangle. Draw the fat line on top of it. From the Line's  
> halo menu choose "embed into ... Rectangle". Now when grabbing the  
> rectangle, the line moves with it. Then make a script like "Line  
> turnBy: 30. Rectangle include: Line's copy." and you're fine to go.
>
> - Bert -
>
>

_______________________________________________
Squeakland mailing list
[hidden email]
http://squeakland.org/mailman/listinfo/squeakland
Reply | Threaded
Open this post in threaded view
|

Re: group objects

Bert Freudenberg
In reply to this post by Randy Heiland
Err, you're right - use a playfield to construct the script. However,  
once the script is there, you could actually replace the playfield  
tile with a rectangle tile and it will still work. Or even better,  
drop a "line's holder" tile into its place ...

This is what I did when I tried it. The reason I preferred a  
Rectangle is that you can pick it up with all its contents. For a  
playfield you would have to fiddle with its options in the halo menu  
to achieve this.

- Bert -

On Mar 10, 2007, at 12:54 , Randy Heiland wrote:

> Thanks Bert.  Ah yes, it's coming back to me.  However, don't I  
> need to use a Playfield as my "container" object?  I followed your  
> instructions - drawing a rectangle and embedding my line into it.  
> But then I couldn't find a "rectangle include" tile in any of the  
> categories - is it there and I just missed it?  In a playfield,  
> it's in the Collections category.
>
>
> On Mar 10, 2007, at 3:45 AM, Bert Freudenberg wrote:
>
>> On Mar 10, 2007, at 2:40 , Randy Heiland wrote:
>>
>>> Apologies if I've asked this in the past and forgot... am I able to
>>> group/join together multiple objects into a composite object?
>>
>> Sure, "embed" them into one "container" object. That can be any  
>> object, like a Rectangle, or an Ellipse may look nice, or just  
>> make it transparent.
>>
>>> I'd like to:
>>>   - paint a fat line
>>>   - script to:  rotate it and make copies
>>>   - treat all lines as a single object
>>
>> Make a Rectangle. Draw the fat line on top of it. From the Line's  
>> halo menu choose "embed into ... Rectangle". Now when grabbing the  
>> rectangle, the line moves with it. Then make a script like "Line  
>> turnBy: 30. Rectangle include: Line's copy." and you're fine to go.
>>
>> - Bert -




_______________________________________________
Squeakland mailing list
[hidden email]
http://squeakland.org/mailman/listinfo/squeakland
Reply | Threaded
Open this post in threaded view
|

Re: group objects

Karl-19
In reply to this post by Randy Heiland
Randy Heiland skrev:
> Apologies if I've asked this in the past and forgot... am I able to  
> group/join together multiple objects into a composite object?
> I'd like to:
>   - paint a fat line
>   - script to:  rotate it and make copies
>   - treat all lines as a single object
There arguably is some logic missing in Squeak here.
While you can select all the objects if you hold down shift and drag
over them, there is no option to group them

Karl


_______________________________________________
Squeakland mailing list
[hidden email]
http://squeakland.org/mailman/listinfo/squeakland
Reply | Threaded
Open this post in threaded view
|

Re: group objects

Alan Kay
In reply to this post by Bert Freudenberg
And of course, you can get out a playfield, fiddle with its options
to allow it to be picked up, make it transparent, etc., then put it
back in supplies, and it will form a prototype of this kind of playfield.

You can also use shift-drag to pick up a group of graphic objects to
put them in the playfield. (This could be a smoother smarter
operation than the current situation in Etoys.)

Cheers,

Alan

At 04:53 AM 3/10/2007, Bert Freudenberg wrote:

>Err, you're right - use a playfield to construct the script. However,
>once the script is there, you could actually replace the playfield
>tile with a rectangle tile and it will still work. Or even better,
>drop a "line's holder" tile into its place ...
>
>This is what I did when I tried it. The reason I preferred a
>Rectangle is that you can pick it up with all its contents. For a
>playfield you would have to fiddle with its options in the halo menu
>to achieve this.
>
>- Bert -
>
>On Mar 10, 2007, at 12:54 , Randy Heiland wrote:
>
> > Thanks Bert.  Ah yes, it's coming back to me.  However, don't I
> > need to use a Playfield as my "container" object?  I followed your
> > instructions - drawing a rectangle and embedding my line into it.
> > But then I couldn't find a "rectangle include" tile in any of the
> > categories - is it there and I just missed it?  In a playfield,
> > it's in the Collections category.
> >
> >
> > On Mar 10, 2007, at 3:45 AM, Bert Freudenberg wrote:
> >
> >> On Mar 10, 2007, at 2:40 , Randy Heiland wrote:
> >>
> >>> Apologies if I've asked this in the past and forgot... am I able to
> >>> group/join together multiple objects into a composite object?
> >>
> >> Sure, "embed" them into one "container" object. That can be any
> >> object, like a Rectangle, or an Ellipse may look nice, or just
> >> make it transparent.
> >>
> >>> I'd like to:
> >>>   - paint a fat line
> >>>   - script to:  rotate it and make copies
> >>>   - treat all lines as a single object
> >>
> >> Make a Rectangle. Draw the fat line on top of it. From the Line's
> >> halo menu choose "embed into ... Rectangle". Now when grabbing the
> >> rectangle, the line moves with it. Then make a script like "Line
> >> turnBy: 30. Rectangle include: Line's copy." and you're fine to go.
> >>
> >> - Bert -
>
>
>
>
>_______________________________________________
>Squeakland mailing list
>[hidden email]
>http://squeakland.org/mailman/listinfo/squeakland

_______________________________________________
Squeakland mailing list
[hidden email]
http://squeakland.org/mailman/listinfo/squeakland