Mantis - tweak
Viewing Issue Advanced Details
29 minor always 06-15-04 17:18 06-29-04 00:07
bert  
andreas  
normal  
resolved  
no change required  
none    
none  
0000029: forEach: #tick do: [...] until: #mouseUp
The expression
    self forEach: #tick do: aBlock until: #mouseUp
does not eval aBlock at all, and does not return on mouse-up. OTOH,
    self clock forEach: #tick do: aBlock until: {self. #mouseUp}
does evaluate the block but does not return.

Notes
(0000025)
andreas   
06-29-04 00:07   
<obj> forEach: #tick do: aBlock until: #mouseUp.

Evaluates aBlock only if <obj> generates #tick events - and player's don't #tick on their own.

  self clock forEach: #tick do: aBlock until: {self. #mouseUp}

won't work since this expression doesn't take "full specs" at this point (sorry about this). BTW, I'm not sure this idiom is any good anyway - I added it early on but it seems that the only useful pattern so far has been handling #mouseMove events so it may be better to introduce specific methods, e.g.,

  <hand> forEachMouseMoveDo:until:
  <clock> forEachTickDo:until:

Thoughts?