uludaggonul / snow-dots

Automatically exported from code.google.com/p/snow-dots
0 stars 0 forks source link

Looping classes should have a runUntil or runWhile method #10

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Classes that step and loop also have a proceed property, which can be
cleared to abort the looping behavior.  These include dotsTheRemoteManager
and topsFunctionLoop.

This requires that objects or fevalables invoked by the loop must keep a
reference to the loop, in order to stop it.  This seems backwards. 
Instead, the loop should be able to runUntil some function returns true, or
runWhile some function returns true.

In fact, maybe even tops should define a superclass/interface that
specifies this behavior.

So a Snow Dots class might directly inherit a tops interface.  I guess this
is fine.

Original issue reported on code.google.com by Benjamin.Heasly on 11 Dec 2009 at 6:33

GoogleCodeExporter commented 8 years ago
This will probably come up when I start writing a statelist.  That might be a 
Tower of 
Psych component, not Snow Dots.

Original comment by Benjamin.Heasly on 16 Feb 2010 at 11:00

GoogleCodeExporter commented 8 years ago
This belongs in the topsRunnable class.  Right now runnables things iterate 
until isDone, and sometimes that depends on time or other objects, sometimes 
not, depending on the flavor of the runnable.  I'm going to leave it that way.

Specifically, dotsAllRemoteObjectManagers have a runForDuration(), which is 
useful for demo scripts.

Original comment by Benjamin.Heasly on 3 Aug 2010 at 5:55