I believe that any UI element, should answer uiManager. And hardcoding the class in a single uiManager method in Morph is a good idea. So i vote in favor of Morph>>uiManager ^ MorphicUIManager default.
Following the same line of thought we should do the same for the globals World, ActiveWorld, ActiveEvent and ActiveHand. I've provided with the code in Issue 3903: Removing the Globals World, ActiveHand and ActiveEvent. As well as direct references to WorldState. Fernando On Sun, Apr 10, 2011 at 9:21 PM, Stéphane Ducasse <[email protected]> wrote: > Hi pharoers > > I was trying to change MenuMorph direct reference to use UIManager because I > was thinking > that a popup menu should not open alone but this is the responsibility of the > UIManager and I was not happy. > why because we have these > UIManager default > > and I started to think about them (ok I'm dead nearly sleeping at 9 in the > evening because I took too much sun > and walk today). My gut feeling is that at least for UI code, any UI element > could have an access to the current UIManager > via an instance variable or a message. > self uiManager. > Now may be the UI World should point to the UIMAnager and each graphical > element should access it like that. > For non UI class then this is a different story. > > But I would like to get your point of view on that point. > > Tx > > stef >
