slava wrote:

> You show this code:
>
>       [
>         dlist> GL_COMPILE glNewList
>           <<<opengl commands>>>
>         glEndList
>       ]
>       slate>
>       set-slate-action
>
>       slate> relayout-1
>
>       [ opengl commands... dlist> glCallList ]
>       slate>
>       set-slate-action
>
> This has a problem because relayout-1 does not redraw the slate
> immediately, in fact it queues a request which is serviced at the next
> iteration of the event loop.

Yes! The above code is missing a wart that is required to make it work:

        1000 sleep

If I insert pause between each clause (set the slate action, request a 
relayout) then this works. I've had to do this silly workaround in a few 
programs. If you look in lsys, there's a 3 second pause.

I was meaning to bring this up to you at some point. So besides:

        slate> relayout-1

Is there something I can call to force the ui to actually do the slate refresh 
to effect the action call?

I reworked golden-section using a similar technique and it suffers from the 
same problem; a 1 sec pause is necessary:

: golden-section-window* ( -- )

f <slate>   { 600 600 } over set-slate-dim   dup "Golden Section" open-window

[ gluNewQuadric >quadric ] closed-quot   over set-slate-action
dup relayout-1

1000 sleep

[ display ] closed-quot   over set-slate-action   dup relayout-1 ;

Ed

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to