[etoys-dev] How can I set/unset (behave like holder) in a script?

Derek O'Connell doc at doconnel.f9.co.uk
Sat May 21 02:56:34 EDT 2011

On 21/05/11 05:51, Steve Thomas wrote:
>  Have a button to include a scaled version of a playfield in another
>  playfield. Due to SQ-935
>  <http://tracker.squeakland.org/browse/SQ-935> I can't place them in a
>  holder (they "auto-scale" further).

Can't comment on that aspect.

>  So how in a script can I change a
>  playfield to either "behave like holder" or "auto-line layout"?
>  I tried to figure it out by inspecting the menu item (so if someone
>  could educate me I can learn the other "tricks", a quick YouTube
>  video would be nice, be sure to mention what key shortcuts you are
>  using if you do ;)

Here's what I do to get to the code from a menu but maybe there is a 
quicker way...

Assuming you have set pref: "debugHaloHandle" in "debug" category...

1. Bring up halo on playfield, "menu" halo then "Playfield options"
     (optionally pin this menu for convenience)
2. Shift+rmb over "behave like holder"
     (optionally pin this menu for convenience)
3. On "debug" menu select "explore morph" (so now exploring the menu 
item morph, not the playfield)
4. Note the "selector" is: #toggleBehaveLikeAHolder
5. Click on (highlight) "target": PasteUpMorph
6. Ctrl/Alt-b to bring up a browser for PasteUpMorph
7. #toggleBehaveLikeAHolder is in the "options" category. The one-liner 
should be what you are looking for.

Alternative Etoys-like method, after step 2 open a viewer on the menu 
item itself (or drag out a copy/clone). In the "miscellaneous" category 
is "Menu fire" tile.


More information about the etoys-dev mailing list