Resist being picked up
chris at funkyobjects.org
Fri May 5 21:28:09 UTC 2006
Another way Bob is to type the actual text of the menu item ("resist being picked up") and press Control+e. This offers a Methods Browser of those methods that contain that string literal, so you can see the one that handles selection of that menu item so you can see to do whatever it does to lock down your own morph.
I admit, it is a bit more cryptic when looking at a menu toggle like that one, but not too bad. We find Morph>>#stickinessString asks #isSticky. Morph>>#isSticky asks its exrtension, so, on MorphExtension, you can "browse inst var defs..." of "sticky".
This will lead you to the setter, #sticky: which, browsing senders, we find Morph>>#beSticky.
This is an example where the TMB pays dividends..
----- Original Message ----
From: Tom Phoenix <rootbeer at redcat.com>
To: The general-purpose Squeak developers list <squeak-dev at lists.squeakfoundation.org>
Sent: Friday, May 5, 2006 12:32:40 PM
Subject: Re: Resist being picked up
On 5/5/06, Bob.Cowdery at cgi-europe.com <Bob.Cowdery at cgi-europe.com> wrote:
> This should be easy but I've not arrived at an answer. I have a bunch of
> custom morphs that I want to 'lock down' when the application is
> running, i.e. stop them being picked up. The code behind the halo
> menu 'resist being picked up' must do the job I want but I can't
> figure how to find it. Can someone point me how to locate this code.
When I use inspect on that item in the halo menu, I see that its
target variable is set to the morph, while its selector variable is
set to #toggleStickiness. Does that tell you enough that you can
locate the code? Hope this helps!
More information about the Squeak-dev