Hi guys,
as a small part of cleaning things up for tweak and 4.0 etc I'm making
a start at a cleaned up event grabber. The current stuff is a nasty
mess of partially overridden methods and mixed use of variables that
needs termination asap.
A couple of questions for you:-
interrupt semaphore. InputSensor has a class variable and keeps a
semaphore in the special objects array and passes it to the vm, which
can then signal it directly. EventSensor uses an instvar, uses the prim
only 'as backwards compatability' and expects to trap the interrupt key
in the processEvent: method. Looking through the vm code I have it's
a bit tricky working out which VMs might be making use of the semaphore
directly. So, given a clean sheet, what would people prefer to do? I
must admit a small attachment to directly signalling from the vm.
interrupt key. Sort of used, sort of setup but completely not platform
specific and probably should be. 'cmd-.' is decidedly not suited to RISC
OS. As with the semaphore, there is a VM angle and we can decide what
to do in this new version.
inputSemaphore. I'm proposing to put this in a subclass that will add
support for platforms that can signal it asynchronously. Other
platforms don't need it - I think.
old state variables & methods. 'twould be nice to dump these so I hope
Tweak doesn't need them.
Comments and thoughts welcomed.
tim
--
Tim Rowledge, ti...@su..., http://sumeru.stanford.edu/tim
Strange OpCodes: DNC: Do Not Collect $200
|