World/currentWorld and projects

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
cbc
Reply | Threaded
Open this post in threaded view
|

World/currentWorld and projects

cbc
Hi.

When creating a new project and entering it, I found that World ~= self currentWorld.
(I found this out by using non-core package that referenced World for some morphs, and 'normal' morph creation in related code - some of the morphs showed up in the parent project, and some in the current project.  It was confusing for a while).

In any case, if you create a new Morphic Project, enter it, and execute this code, you will see that currentWorld (and ActiveWorld) are not the same as World:

World "a PasteUpMorph(2434915) [world]"
self currentWorld "a PasteUpMorph(3230487) [world]"
ActiveWorld "a PasteUpMorph(3230487) [world]"

Is this intentional?

-cbc


Reply | Threaded
Open this post in threaded view
|

Re: World/currentWorld and projects

David T. Lewis
On Tue, Nov 21, 2017 at 10:18:21AM -0800, Chris Cunningham wrote:

> Hi.
>
> When creating a new project and entering it, I found that World ~= self
> currentWorld.
> (I found this out by using non-core package that referenced World for some
> morphs, and 'normal' morph creation in related code - some of the morphs
> showed up in the parent project, and some in the current project.  It was
> confusing for a while).
>
> In any case, if you create a new Morphic Project, enter it, and execute
> this code, you will see that currentWorld (and ActiveWorld) are not the
> same as World:
>
> World "a PasteUpMorph(2434915) [world]"
> self currentWorld "a PasteUpMorph(3230487) [world]"
> ActiveWorld "a PasteUpMorph(3230487) [world]"
>
> Is this intentional?
>

No, that is not intentional.  I have restored the earlier versions of
finalExitActions: and finalEnterActions:. Can you please update one more
time and see if the problem goes away?

Also, if you find issues that seem to be related to a non-core package,
can you say what package is involved?

Thank you very much for testing this, I am really sorry for causing the
disruption.

Dave


cbc
Reply | Threaded
Open this post in threaded view
|

Re: World/currentWorld and projects

cbc
On Tue, Nov 21, 2017 at 12:49 PM, David T. Lewis <[hidden email]> wrote:
No, that is not intentional.  I have restored the earlier versions of
finalExitActions: and finalEnterActions:. Can you please update one more 
time and see if the problem goes away?
The problem has gone away (from what I can tell - I adjusted the other package to use #currentWorld already). 

Also, if you find issues that seem to be related to a non-core package,
can you say what package is involved?
I'm using the Saucers code (well, the Sprites part of it) for another project.  From the sar at: (Saucers! http://www.zogotounga.net/comp/saucers.htm) 

Thank you very much for testing this, I am really sorry for causing the
disruption.
Don't be (at least not on my account).  If you hadn't been pushing these changes, I probably wouldn't have tried such weird things in the first place.  Between these changes and discussions and the earlier discussion about Projects, I'm now building a new type of project that loads code and sets up the world on entry for use; and tears it down on exit from the Project.  What a great way to spend vacation time.  Fun!

-cbc