I have some projects where I need to navigate among them via buttons. When I apply the enter method to a project from a mouseUp: method from an object in a different project, it works. But code in that method following
targetProject enter
is just not executed. It's as though entering a project completely "reboots" code execution from inside that project.
How can I enter a project and then execute code from inside that project, where the code is invoked from the "source" project?
This is all very puzzling, and seems like magic.
Here's an example of something that doesn't work. Bring up an explorer on an object with an instance variable containing a project. Highlight the project, and then doIt the following code:
self enter. PopUpMenu inform: 'Hoot'
If "self" refers to the same project, the Hoot message appears. But if "self" refers to a different project, the project is entered but the 'Hoot' doesn't happen. How do I do "project-spanning" code?
-Thanks, Jim
Try this instead:
WorldState addDeferredUIMessage:[PopUpMenu inform: 'Hoot']. self enter.
Cheers, - Andreas
Jim Rosenberg wrote:
I have some projects where I need to navigate among them via buttons. When I apply the enter method to a project from a mouseUp: method from an object in a different project, it works. But code in that method following
targetProject enter
is just not executed. It's as though entering a project completely "reboots" code execution from inside that project.
How can I enter a project and then execute code from inside that project, where the code is invoked from the "source" project?
This is all very puzzling, and seems like magic.
Here's an example of something that doesn't work. Bring up an explorer on an object with an instance variable containing a project. Highlight the project, and then doIt the following code:
self enter. PopUpMenu inform: 'Hoot'
If "self" refers to the same project, the Hoot message appears. But if "self" refers to a different project, the project is entered but the 'Hoot' doesn't happen. How do I do "project-spanning" code?
-Thanks, Jim
--On July 3, 2007 6:38:51 PM -0700 Andreas Raab andreas.raab@gmx.de wrote:
How do I do "project-spanning" code?
Try this instead:
WorldState addDeferredUIMessage:[PopUpMenu inform: 'Hoot']. self enter.
Thank you!! It works!
Umm, how is one supposed to "discover" this? (Other than by asking *here*, of course ... :-))
Some things in Morphic are pretty easy to figure out for oneself, but others are pretty esoteric. I'm totally in a murk regarding hands, for instance. Is there such a thing as a tutorial on Morphic / World / Project internals?
-Thanks, Jim
squeak-dev@lists.squeakfoundation.org