Calling methods from primitives

Stephen Pope stp at create.ucsb.edu
Thu Apr 29 16:08:14 UTC 1999


Stephen Pair wrote:
> 
> Does anyone how to invoke a method on an object from within a primitive?  Is
> there a way?

There's no direct and simple way to handle arbitrary "call-backs" from the VM
into Smalltalk. I do it via Semaphores. You can easily register a semaphore as
an external object, then signal it from a primitive. If you have a Smalltalk
process waiting on the semaphore, it can do whatever it wants -- send a message,
call another primitive, etc.

-- 
stp

  Stephen Travis Pope
  stp at create.ucsb.edu      http://www.create.ucsb.edu/~stp/





More information about the Squeak-dev mailing list