Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
ActiveWorld
Last updated at 3:25 pm UTC on 20 September 2020
ActiveWorld is a global variable in Morphic which keeps the world morph instance of PasteUpMorph of a Morphic project

The rationale for ActiveWorld is explained in the original ActiveGlobals change set by Andreas Raab.

 Project current world == ActiveWorld
answers
 true

 ActiveWorld class
answers
 PasteUpMorph

 ActiveWorld isWorldMorph
answers
 true

 ActiveWorld == World
answers
 true


Question: What is the reason to have two of these global variables pointing to the same object?



In our current use of Morphic (Nov 2017), there is no difference between"World" and "ActiveWorld".

Back in the Squeak 2.0 release (and maybe later?), "World" was the outermost world and "ActiveWorld" was the world that is involved in the particular event dispatch (see ActiveEvent, too), which could be in a window, for example.


This means that everyday debugging, one should use "ActiveWorld" instead of "World".

It would be good to get "worlds in worlds" working again.


More


To better understand the dynamically-scoped ActiveWorld global, see:

 HandMorph >> #sendEvent:focus:clear:
 Morph >> #processEvent:
 PasteUpMorph >> #processEvent:using: