Getting events to 'buried' Morphs

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

Getting events to 'buried' Morphs

timrowledge
Here’s a fun problem.

In the Ancient Days of say 2002-ish when electricity came in little bags delivered to your door by Gnomes, you could add a BorderedMorph in front of another morph, completely overlaying it, and still get the events in the underlying morph. This is being used in old Scratch code to put a warning rectangle around a block. Do that in the current morphic world and no events get to the underlying morph. That’s a bit of a problem in some cases.

Are there any already provided ways to get around this? I’ve considered making the border out of four separate morphs, maybe a subclass of BorderedMorph that somehow doesn’t block events, but it seems like something somebody else might have battled before.

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Strange OpCodes: CPE: Create Parity Error



Reply | Threaded
Open this post in threaded view
|

Re: Getting events to 'buried' Morphs

Bert Freudenberg
On 28.10.2014, at 14:32, tim Rowledge <[hidden email]> wrote:

> Here’s a fun problem.
>
> In the Ancient Days of say 2002-ish when electricity came in little bags delivered to your door by Gnomes, you could add a BorderedMorph in front of another morph, completely overlaying it, and still get the events in the underlying morph. This is being used in old Scratch code to put a warning rectangle around a block. Do that in the current morphic world and no events get to the underlying morph. That’s a bit of a problem in some cases.
>
> Are there any already provided ways to get around this? I’ve considered making the border out of four separate morphs, maybe a subclass of BorderedMorph that somehow doesn’t block events, but it seems like something somebody else might have battled before.

Lock it.

- Bert -






smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Getting events to 'buried' Morphs

timrowledge

On 28-10-2014, at 12:59 PM, Bert Freudenberg <[hidden email]> wrote:

> On 28.10.2014, at 14:32, tim Rowledge <[hidden email]> wrote:
>
>> Here’s a fun problem.
>>
>> In the Ancient Days of say 2002-ish when electricity came in little bags delivered to your door by Gnomes, you could add a BorderedMorph in front of another morph, completely overlaying it, and still get the events in the underlying morph. This is being used in old Scratch code to put a warning rectangle around a block. Do that in the current morphic world and no events get to the underlying morph. That’s a bit of a problem in some cases.
>>
>> Are there any already provided ways to get around this? I’ve considered making the border out of four separate morphs, maybe a subclass of BorderedMorph that somehow doesn’t block events, but it seems like something somebody else might have battled before.
>
> Lock it.

Huh. Fascinating; it certainly works but it isn’t exactly an obvious name.

Ta!


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
M$ are grinning pigs in a sea of buggy code - The Inquirer