[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Special Weirdness Hoped
- From: Jeffrey Drake <wackysteak@...>
- Date: Thu, 17 Jun 2004 02:39:59 -0400
-----BEGIN PGP SIGNED MESSAGE-----
I am making a program that I am trying to change the (lua) API in to
make it better suited for evolution.
The program is rather like glut is, but written using Cocoa's API
(objective-c / mac) to host it, but still opengl. Lua runs the actual
Right now the events work similar to glut.
A trimmed down example:
What happens is that it will load up the module an execute it, so that
the functions become registered. Then the script essentially is done
until an event is fired by resizing the window.
This is fine for basic stuff, but I want to make it more like how
windows does it.
A hypothetical example:
- -- performed in a loop
e = Event.GetEvent()
if e.type == WM_RESIZE then
The key being GetEvent.
Where the magic here is, and I am hoping can be done in some way...
GetEvent 'blocks' until an event is received, in exactly the same way
as the original example worked.
From my limited exposure to other languages continuations would work
here if they were available :-). It has been suggested coroutines might
be the way, but I do not know even of that.
:-) Merci pour l'assistance
- - Jeff
"Reportedly, he remarked to one of his Christian missionary friends:
'What you teach us to do is admirable, but what you teach us to believe
- - Referring to King Mongkut of Siam
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)
-----END PGP SIGNATURE-----