On Sun, 30 Apr 2000 20:13:23 +0200 Stefan Matthias Aust sma@3plus4.de wrote:
Actually, I think it isn't needed. It's a handy reference but every morph can be asked for its world by using #world already.
Assuming that morph is in the world already.
To add new morphs to the world, one could ask the (actually one) hand morph for the world. (BTW, I bet that not all code in morphic can deal with the fact that there could be more than one hand)
David, I think you're right. One could remove the global and replace its references with a few new methods.
That's a good idea, but it still leaves the question of where those few methods will find the world. Object>>currentWorld starts out:
World ifNotNil: [^ World].
Cheers, Bob
At 14:43 30.04.00 -0400, Bob Arning wrote:
That's a good idea, but it still leaves the question of where those few methods will find the world. Object>>currentWorld starts out:
World ifNotNil: [^ World].
It would be already an improvement if only this method an another one which sets the global would be the only references to the global.
To answer the question: It's only a blind, uninformed guess but maybe we can delegate to the current project somehow. Hm, or does the world know the current project?
bye -- Stefan Matthias Aust // ...come on, kiss the frog!
At 23:11 30.04.00 +0200, Stefan Matthias Aust wrote:
At 14:43 30.04.00 -0400, Bob Arning wrote:
That's a good idea, but it still leaves the question of where those few methods will find the world. Object>>currentWorld starts out:
World ifNotNil: [^ World].
It would be already an improvement if only this method an another one which sets the global would be the only references to the global.
Okay, I replaced all nil tests to "World" with "Smalltalk isMorphic". A 66k change is available at www.3plus4.de/squeak/. I also replaced "World primaryHand attachMorph:" commands with a new service in HandMorph.
The remaining 56 references use either World refresh the screen - which can also be removed I think - or to fiddle around with projects and worlds-in-worlds - I'm not so sure what to do here.
bye -- Stefan Matthias Aust // ...dancing on the dark side of moon
squeak-dev@lists.squeakfoundation.org