passing cmds up from the VM, was pending mac vm 3.2.4

Andreas Raab Andreas.Raab at gmx.de
Tue Feb 19 22:41:30 UTC 2002


John,

> Well ignoring David's comments/questions about why can't I stick 
> something on a queue for the moment. I'll point out the event 
> structure is this
> 
> typedef struct sqInputEvent {
> 	int type; /* type of event; either one of EventTypeXXX */
> 	unsigned int timeStamp; /* time stamp */
>       /* the interpretation of the following fields depend on 
> the type 
> of the event */
> 	int unused1;
> 	int unused2;
> 	int unused3;
> 	int unused4;
> 	int unused5;
> 	int unused6;
> } sqInputEvent;
> 
> Now what interesting things can you do if you want to pass 
> information upwards and you have 6 integers to work with? 

What you can (and should :-) do is to define one of these six ints as a
flag saying "there are n message in the queue please call the
appropriate primitive to retrieve the contents" and buffer everything in
the VM. No need to abuse the event structure just to stick in something
that it wasn't designed to deal with ;-)

Cheers,
  - Andreas





More information about the Squeak-dev mailing list