Morphic>>step

Daniel Vainsencher danielv at netvision.net.il
Fri Nov 6 18:10:36 UTC 1998


Gerardo,
I'm not sure what the scenario for your problem is and what you would
consider convinient,
but the following code simply makes sure that an object that does not return
from it's step is not called again until it does so.
This means that if you are not able to fix the bug and proceed, you will
have to send it startStepping after exiting the debugger.

(that's pretty easy if you're using MWs - you simply point at the morph, and
type
    self startStepping
or if the morph is a wrapper
    self asMorph startStepping)


This should be inserted in WorldMorph>>runStepMethods, replacing the similar
true-block after "m world == self ifTrue:"
(wakeupTime <= now and: [ wakeupTime > 0])
     ifTrue: [
      entry at: 2 put: (0 - wakeupTime).
      m step.
      entry at: 2 put: now + m stepTime]]

Tell me if this fixes your problem.

BTW, does anyone that knows this code better see any possible problems (feel
like a thief, simply swiping objects of a queue...)

Gerardo Richarte wrote:

>     Sometimes I have a problem... When some Morph is stepping and
> suddenly an error pops up from it’s #step method, I can stop this
> happen, soI need to quit squeak without saving, what I don’t like!
>     I can understand why this happens, and that it’s perfectly normal
> (if there is such an error), but I’d like to have a way of stopping
> this, or better, to make the morph stop stepping if there is an error in
> its #step method.
>     Any idea out there?
>
>     Unsolvable Bye!
>     Richie++





More information about the Squeak-dev mailing list