[Cuis-dev] Delay for UI

Hilaire Fernandes hilaire at drgeo.eu
Fri May 29 04:08:47 PDT 2020


Hi,

I need some morph operations to terminate (animations, I will make a 
package of this Thibault Raffaillac animation framework I just ported to 
Cuis) before resuming the normal execution.

In code bellow, it is waiting for some animation to terminate before 
doing other Morph operation.

I try with a Delay but it stalls the whole UI, so the animation does not 
occur.

openInWorld | imageMorph center | imageMorph _ SketchMorph new image: 
(self imageForm: 32). center _ self activeHand morphPosition. self 
center: center. imageMorph morphExtent: 0 at 0; center: center; 
openInWorld. imageMorph morphExtent: (self morphExtent during: 0.5 
seconds); center: (center during: 0.5 seconds). (Delay forSeconds: 0.5) 
wait. imageMorph dismissMorph. super openInWorld


I tried something like bellow, but the super in the block only goes to 
self of the Morph, so it results in an infinite animation

[(Delay forSeconds: 0.5) wait. imageMorph dismissMorph. super 
openInWorld] forkAt: Process userPriority

Thanks

Hilaire


-- 
GNU Dr. Geo
http://drgeo.eu

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20200529/8d5700d4/attachment.htm>


More information about the Cuis-dev mailing list