| rnd |
rnd := Random new.
100 timesRepeat: [
WorldState addDeferredUIMessage: [
Morph new openInWorld; center: rnd next @ rnd next * Display extent.
]
].
You'll notice it takes a couple of seconds to finish opening all the morphs, but if you remove the #addDeferredUIMessage: send, it is instantaneous. In Squeak and Etoys both versions are equally fast.
I looked at it a little, and I think Pharo has a bug in WorldState>>#runStepsMethodsIn:. It seems it only executes one deferred ui message per step. With the implementation below the problem is fixed.
WorldState>>#runStepMethodsIn: aWorld
"Perform periodic activity inbetween event cycles"
| queue nextInQueue|
"If available dispatch some deferred UI Message"
queue := self class deferredUIMessages.
[(nextInQueue := queue nextOrNil) isNil]
whileFalse: [ nextInQueue value].
self runLocalStepMethodsIn: aWorld.
Best regards,
Richo
On Wed, Jan 19, 2011 at 6:40 PM, Ricardo Moran
<richi.moran@gmail.com> wrote:
The latest stable 1.1.1. I will look at it tomorrow and try to find out more.
On Wed, Jan 19, 2011 at 6:38 PM, St�phane Ducasse
<stephane.ducasse@inria.fr> wrote:
hi ricardo,
which version are you using?
Stef
On Jan 19, 2011, at 10:32 PM, Ricardo Moran wrote:
> I forgot to say it works in Squeak and Pharo (although in Pharo it's *painfully* slow, I don't know why yet...)
>
> Cheers
> Richo
>
> On Wed, Jan 19, 2011 at 6:04 PM, Ricardo Moran <
richi.moran@gmail.com> wrote:
> Hi guys!
> I want to tell you some exciting news. Thanks to the ESUG Innovation Technology Awards we've been able to buy ourselves a Microsoft Kinect. We don't have a Xbox 360 yet, but that doesn't mean we can't have a little fun with it. Who needs and Xbox if you can use Kinect with Etoys? :)
>
> After seeing Stephen Howell's great work using Kinect with Scratch, we followed his steps and made it available for Etoys as well.
> See it for yourselves:
http://www.youtube.com/watch?v=YnqqaHvbeqg
>
> You can find installation steps in our blog:
http://tecnodacta.com.ar/gira
>
> Cheers!
> Richo
>
>