Idling on high -- an event driven Squeak?

Maloney johnm at wdi.disney.com
Mon Apr 20 09:43:27 UTC 1998


Re:
>The difficulty in making Squeak purely event driven is because all the
>base ST-80 MVC classes depend on polling for cursor position and key
>presses and such. These polls are convoluted and timing dependent. 
>...
>
>Perhaps the transition to Morphic will make an event driven Squeak
>easier to do (although, currently Morphic still relies on a MVC loop at
>the heart of it).

All of Morphic is event-based except in the outer event loop,
where it still polls for the cursor position and builds an event
to be passed to to the rest of Morphic. So, it will be pretty
easy to convert Morphic to be completely event driven. Note that
Morphic supports the notion of continuously running animations
and other activities, and that applications using this feature
will naturally consume CPU time even with the user isn't doing
anything but watch. However, the goal would be for the system
to use practically zero CPU time while idling when there were
no animations running.

Nice explanation of the challenges of doing a Newton Squeak VM!
I did a version of the Squeak VM that ran as a Netscape Plugin.
The problem is similar to the Newton problem: Netscape wanted
to be in control and to just pass events to Squeak from time
to time. However, there was a way to ask for "idle" events, and
I used these to keep Squeak going even when there were no
user input events. The basic idea was to run Squeak for some
number of bytecodes for each event, then return to Netscape.
I wonder if a similar scheme would work for getting your Newton
port going?

Too bad about Apple dumping the Newton. :-( But there are
enough Newtons and E-Mates out there that a Newton Squeak
would still be very interesting. And I believe the Newton would
run Squeak quite nicely, given enough memory.

	-- John





More information about the Squeak-dev mailing list