Is this a good thing?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Is this a good thing?

Bob Arning
I was going a little nuts today when messages being sent never seemed to arrive. It turns out that part of the problem was #future being sent before a TIsland has been installed in Processor. In this case the #future message is basically a no-op and returns nil. Is this a good thing? Do people count on it working this way? Example stack below from dragging the sailing demo out of Objects:

Island(Object)>>halt <-- I added this to trap the culprits.
Island>>scheduleMessage:future:
UndefinedObject(Object)>>futureDo:at:args:
TAvatarUserMotion>>hasMotion:
TAvatarUserMotion>>loadAvatar:
CroquetHarnessWithMenu>>initialize
CroquetHarnessWithMenu class(Behavior)>>new
SailingDemoMaster>>setup
[] in SailingDemoMaster(CroquetParticipant)>>step {[harness   ifNil: [self setup]   ifNotNil: [harness step]]}
BlockContext>>ensure:
SailingDemoMaster(CroquetParticipant)>>step
SailingDemoMaster(BFDParticipant)>>step

A related issue here is that #future is being sent to nil. I guess I can (if I try real hard) imagine why someone would want to do that, but my guess is that this is an error more often something intentional. Does "nil future foo" have a use?

Cheers,
Bob