Improving the aesthetics and usability of Squeak

Andreas Raab Andreas.Raab at gmx.de
Tue Jul 9 12:42:19 UTC 2002


Jim,

> As far as implementing native widgets and windows, there's 
> one "trick" and the rest is straightforward. You know all this,
> but I'll write it anyway.
> 
> The "trick" is to implement callbacks, which requires some
> VM/Squeak compiler support.

I don't know how often I have said this but for the majority of stuff
you may want to do you do *NOT* need callbacks. Example Windows:
Everything related to window handling is done through messages received
through GetMessage and then dispatched through DispatchMessage. The
callback registered with your window is called from DispatchMessage.
Therefore, if you wanted to handle Windows messages all you'd need is to
call GetMessage(), figure out the receiver window, and dispatch it from
Squeak. In fact, that's what the C code in ioProcessEvents() says.

AFAIK, the same is true for X11 (XNextEvent or what it's called) and
MacOS (don't remember the exact name for the call).

There are a few things that you cannot do this way (just because the OS
API provides no "polling interface" for it) but it will take you a
looooooong way into that direction.

Try to be a bit creative!

Cheers,
  - Andreas




More information about the Squeak-dev mailing list