Hi, all.
Just for clarification: Each kind of project has its own kind of world. It is not specific to Morphic. Look at MVC, SqueakShell, and the generic Project interface. :-)
Best, Marcel Am 25.11.2017 08:59:53 schrieb Marcel Taeumel marcel.taeumel@hpi.de: Hi Dave,
the term "current" in "currentProjectWorld" seems not appropriate for "Project current world" because it is not dynamically scoped like #currentWorld. Also it is not Morphic-API. Would thus be confusing in the long term.
Assuming that currentEvent, currentHand, and currentWorld are in a *Morphic extension, what about adding "Project class >> #currentWorld" instad? Let's not spoil the Object interface more than necessary. :-)
Best, Marcel Am 25.11.2017 03:36:13 schrieb David T. Lewis lewis@mail.msen.com: In Object method category *Morphic-Kernel, we currently have three methods:
Object>>currentEvent "Answer the current Morphic event. This method never returns nil."
Object>>currentHand "Return a usable HandMorph -- the one associated with the object's current environment."
Object>>currentWorld "Answer a morphic world that is the current UI focus."
I want to suggest adding one more method:
Object>>currentProjectWorld "Answer a morphic world for the current project." ^Project current world
Rationale: In the course of removing direct references to the global variable World, there are now numerous repetitions of the "Project current world" idiom. If these are replaced by "self currentProjectWorld", the code is a bit more readable, and the references to Project current world are easier to find. This should also make the distinction between #currentWorld and #currentProjectWorld easier to understand.
Is it OK if I add this method, and replace the current "Project current world" usage with "self currentProjectWorld" throughout?
Dave