|
|
|
|
|
by jecel
2203 days ago
|
|
While being class based does make Squeak's Morphic a bit more awkward than Self's, the big difference is that it is a hybrid system that can run older MVC (Model View Controller) applications with little or no modification. That means that there are two different ways of doing most things and someone looking for examples to copy might run across the MVC version instead of the "proper" Morphic version. |
|
There wasn't any automatic way to go from the morph instances to equivalent morph constructors, or any way to save the morph instances to copy and use later. So I ended up ignoring the instance manipulation and just coded morph creation methods.
In this way, the morph class hierarchy became much like a hierarchy of factories.
This mattered when I was doing a GUI to run on my Compaq iPaq because a lot of morphs (such as menus) were being created afresh each time they were needed. This was really slow and I only made it usable by caching the created menus and only displaying them when needed.
On Self I would have just copied the previously constructed menuMorph prototype and displayed it (if of course I had been able to port the huge pile of C++ that is the Self VM to the iPaq :)
This was ages ago though and I haven't played properly with modern Squeak or Cuis.