« Return to Thread: How to Send a Message to the Squeak Image

Re: How to Send a Message to the Squeak Image

by Rob Rothwell-2 :: Rate this Message:

Reply to Author | View in Thread

 
Thank you both...I bet I can actually figure out the EventSensor way; doing it by using the approved method is a little beyond me at this time.  I've never even used primitives yet--let alone written any in the VM!

Thanks for your time,

Rob


On Sat, Mar 1, 2008 at 9:31 PM, John M McIntosh <johnmci@...> wrote:
I'll note this way is the approved method of doing it since it doesn't
require changing EventSensor.
Requires a bit more code and complexity

On Mar 1, 2008, at 6:25 PM, Igor Stasenko wrote:

> Well, you can do in similar way how VM does for transferring user
> input to Smalltalk side.
>
> In VM:
> - add some variable(s) to hold your event parameters
> - on some event, handled by windowProc(), set these parameters, and
> signal semaphore.
> - add primitive which when called, transforms event parameters to
> objects.
> - add primitive to register given semaphore , which will be signaled
> when event occurs
>
> In smalltalk:
> - call primitive to register semaphore
> - create process, waiting on given semapore, once it signaled, call
> primitive to read event details.

--
=
=
=
========================================================================
John M. McIntosh <johnmci@...>
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
=
=
=
========================================================================





--
The foolish reject what they see, not what they think; the wise reject what they think, not what they see.  -- Huang Po

 « Return to Thread: How to Send a Message to the Squeak Image