[squeak-dev] OpenGL morphic issue with "embedd in window"
lenglish5 at cox.net
Mon Apr 19 03:55:55 UTC 2010
Ross Boylan wrote:
> On Sun, 2010-04-18 at 18:28 -0700, Lawson English wrote:
>> Jeroen has been helping me more than a bit with learning how to use
>> OpenGL with squeak, but I've hit a stumbling block I can't quite get
>> around and Jereon has been busy lately:
>> when I put an OGLMoprh in a window via the menu, the close box
>> apparently doesn't delete the morph the same way as it does via using
>> the x-halo (without embedding)
>> The x-halo sends a delete directly to the OGLMorph which sends
>> However, the window's close box AND the window's x-halo apparently do
>> things a tiny bit differently.
>> The window disappears, and the OpenGL context becomes unselectable, but
>> stays around.
>> If I send openInWorld to the original OGLMorph, it becomes active again
>> and the x-halo of OGLMorph will still do the OpenGL>>destroy on the
> I just ran into a similar situation; whether it is similar enough is for
> you to judge. I have a manager class that opens 2 Morphs; when one of
> them (a SystemWindow) is killed I wanted the other one killed as well.
> I made my manager the model of the SystemWindow morph. When the
> SystemWindow is destroyed, it sends #windowIsClosing to its model (i.e.,
> my manager). The manager can implement #windowIsClosing to delete the
> other Morph.
> This may or may not be an advisable use of the model mechanism, but it
> seems to work.
It sounds like it would work, but it feels "wrong" somehow. :-/
Thanks for the suggestion. I'll use it for now, but I certainly hope
there's a better mechanism available.
Lawson (loving the documentation of Squeak, as always)
More information about the Squeak-dev