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