[Q] slang

David T. Lewis lewis at mail.msen.com
Mon Feb 17 12:54:01 UTC 2003


On Mon, Feb 17, 2003 at 12:36:20PM +0100, Alexandre Bergel wrote:
> Hello,
> 
> I have read the chapter "Extending the Squeak Virtual Machine" in the blue book, but there is still some dark points.
> How could I get an oop from a class I made ? What would be the Slang/C translation for 'Smalltalk at: #MyGreatClass' ?
> 

Well, you would not actually do 'Smalltalk at: #MyGreatClass' in slang, but if for some
reason you need the oop for an object in your plugin, just pass the object as a
parameter to your primitive in the plugin. Any object which you pass as a parameter
will show up in the stack (see implementers of #stackValue: and similar methods).
The thing that actually gets put on the stack just happens to be the oop for the
object. Of course, you should not actually use the oop for anything, but it maybe
it's interesting to know what one looks like.

Dave



More information about the Squeak-dev mailing list