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.
Thanks Bob *** Confidentiality Notice ***
Proprietary/Confidential |
On 5/5/06, [hidden email] <[hidden email]> 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! --Tom Phoenix |
In reply to this post by Bob.Cowdery
On 5/5/06, [hidden email] <[hidden email]> wrote: > This should be easy but I've not arrived at an answer. I have a bunch of
Tom Phoenix wrote:
If I could read I would be dangerous. Yes thanks Tom. I looked at sticky and thought is that related but didn't try it. I will try to remember everything can be explored! --Bob *** Confidentiality Notice ***
Proprietary/Confidential |
In reply to this post by Bob.Cowdery
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.Do this in Workspace m := Morph new openInHand;toggleStickiness Got the idea ? Cheers Edgar |
In reply to this post by Tom Phoenix
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.. - Chris ----- Original Message ---- From: Tom Phoenix <[hidden email]> To: The general-purpose Squeak developers list <[hidden email]> Sent: Friday, May 5, 2006 12:32:40 PM Subject: Re: Resist being picked up On 5/5/06, [hidden email] <[hidden email]> 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! --Tom Phoenix |
Hi Chris,
CM> We find CM> Morph>>#stickinessString asks #isSticky. Morph>>#isSticky asks CM> its exrtension, so, on MorphExtension, you can "browse inst var CM> defs..." of "sticky". CM> This will lead you to the setter, #sticky: which, browsing CM> senders, we find Morph>>#beSticky. CM> This is an example where the TMB pays dividends.. say it out loud. TMB is TracingMessagesBrowser, and the dividends are "Browsers you don't have to open and close". I'm waiting for the day I get a millionaire in saved windows! Can't advertise this one enough :-)) Cheers Herbert mailto:[hidden email] |
Free forum by Nabble | Edit this page |