simple named primative based on Greenberg's "Extending the Squeak Virtual Machine" example plugin not loading.

Michael Kohout mwkohout at gmail.com
Thu Jan 19 22:17:33 UTC 2006


Thanks for those who forwarded me information on how to build a 3.8 vm
on OS X.  I was able to finally build a vm for my 3.8 image.

I also went ahead and built a simple named primative(based on the
example from Andrew Greenber's "Extending the Squeak Virtual Machine"
from the NuBlue book-but instead of extending InterpreterPlugin used
SmartSyntaxInterpreterPlugin.

But after rerunning VMMaker(which I then verify is generating the .c
files) and rebuilding the vm(and I do see the generated .c files in
the "compile sources" step of the debug build target), I do a call out
to my test plugin while using the new vm.  For some reason my code
doesn't seem to find it(when I do a call out to the plugin via the
interface, it reverts to using the code after the call to the
primitive).

Here is my plugin class def:
SmartSyntaxInterpreterPlugin subclass: #ExamplePlugin
	instanceVariableNames: ''
	classVariableNames: ''
	poolDictionaries: ''
	category: 'My Stuff-Plugins'

-it's single method-
answerSeventeen
	"comment stating purpose of message"
	self export: true.
	interpreterProxy
		pop: 1
		thenPush:(interpreterProxy integerObjectOf:17)

-it's single class method-
declareHeaderFilesIn: aCCodeGenerator
		aCCodeGenerator addHeaderFile: '<occi.h>'

the interface class:
Object subclass: #ExampleCaller
	instanceVariableNames: ''
	classVariableNames: ''
	poolDictionaries: ''
	category: 'My Stuff-Plugins'

-it's single method-
call
	<primitive:'answerSeventeen' module: 'ExamplePlugin'>
	^false.

Why doesn't the plugin load and run?  I apologize in advance if I've
not looked at some documentation that already answers these questions.
I've also included the fileouts of these two classes if you'd prefer
looking at them in that format.

thanks for your help,
Mike Kohout
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ExamplePlugin.st
Type: application/octet-stream
Size: 1168 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20060119/4262a0c7/ExamplePlugin.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ExampleCaller.st
Type: application/octet-stream
Size: 382 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20060119/4262a0c7/ExampleCaller.obj


More information about the Squeak-dev mailing list