Trying to go through plugin tutorial

Tim Rowledge tim at sumeru.stanford.edu
Wed Aug 27 18:37:54 UTC 2003


Joel Shellman <joel at ikestrel.com> wrote:

> And I have FooPlugin.dll and I've placed that into the same directory as 
> Squeak.exe. However, it doesn't appear to be running my primitive. I put 
> a Transcript#show in the compiled plugin and then changed it in my code 
> so I could see which one it's running. It appears to be running the 
> interpreted code.
> 
> Is putting FooPlugin.dll in the same directory as squeak.exe sufficient 
> on Windows (I notice the tutorial is for Mac)? I also tried putting it 
> in the same directory as the image, and that didn't work either.
> 
> Also, is there a requirement for the name of the dll? Does it have to 
> match the moduleName?
Yes, the dll must be name _exactly_ as the plugin is used in the calling
methods. Note that in the tutorial in step 5 Andrew used the method
#moduleName to set the plugin's name to Foo rather than FooPlugin (there
have been assorted discussions about the right ways to name plugins) and
so the dll would have become 'Foo' rather than 'FooPlugin'.

Given that you have compiled your code already, the simplest thing to do
is to go back to the calling methods and change the lines <primitive:
'wibble' module: 'Foo' > to <primitive: 'wibble' module: 'FooPlugin'>
and try again. Guess the tutorial needs some tweaking.

Oh, you can't simply change the name of the dll since there is an
internal record of the name used to create the code that is checked at
load time.


tim
--
Tim Rowledge, tim at sumeru.stanford.edu, http://sumeru.stanford.edu/tim
"My name is Inigo Montoya. You killed my parent process. Prepare to vi!"



More information about the Squeak-dev mailing list