<br><br>On Monday, Bob Arning wrote:<br><br>> If you look at: WorldState>>triggerAlarmsBefore:, you see the claim:<br>><br>> "Trigger all pending alarms that are to be executed before nowTime."<br>
><br>> when, in fact, it triggers one at most:<br>><br>> triggered := OrderedCollection new.<br>> self lockAlarmsDuring: [:pending |<br>> (pending isEmpty not and: [pending first scheduledTime < nowTime])<br>
> ifTrue: [triggered add: pending removeFirst]].<br>> triggered do: [:alarm | alarm value: nowTime].<br>><br>> makes me want to<br>><br>> Smalltalk destroyAllComments ;-)<br>><br>> Cheers,<br>
> Bob<br><br>Whoops! That ifTrue: should be whileTrue:<br><br>John<br><br><br>><br>> On 8/19/13 5:56 AM, Marcel Taeumel wrote:<br>><br>> Hi! :)<br>><br>> One point against blocking the event loop: You never know who will call<br>
> #flash as it is public API. It is not guaranteed that the flashing morph is<br>> "visible" at all and not occluded by some other morph. Then, strange short<br>> image freezes will be noticed.<br>><br>
> On 8/19/13 6:07 AM, Marcel Taeumel wrote:<br>><br>> Here a better version:<br>><br>> (self valueOfProperty: #colorBeforeFlashing ifAbsent: [self color])<br>> in: [:c |<br>> self setProperty: #colorBeforeFlashing toValue: c.<br>
> self color: ((c ifNil: [Color white]) alpha: 1) negated.<br>> ActiveWorld displayWorldSafely.<br>>                 <br>> self<br>> removeAlarm: #color:;<br>> removeAlarm: #removeProperty:.<br>
> self<br>> addAlarm: #color: with: c after: 100;<br>> addAlarm: #removeProperty: with: #colorBeforeFlashing after: 100]. <br>><br>> I am not exactly sure, why an explicit call to the render loop is needed...<br>
> But this way, it works without blocking the event loop. This "ActiveWorld<br>> displayWorldSafely" is still annoying...<br>><br>> Best,<br>> Marcel<br>><br>><br>><br>> --<br>> View this message in context: <a href="http://forum.world.st/computers-too-fast-these-days-tp4704067p4704117.html">http://forum.world.st/computers-too-fast-these-days-tp4704067p4704117.html</a><br>
> Sent from the Squeak - Dev mailing list archive at Nabble.com.<br>><br>><br>><br>><br><br>-- <br><a href="http://jmck.seasidehosting.st" target="_blank">jmck.seasidehosting.st</a><br>