[BUG][FIX]Re: Problem translating plugins

John M McIntosh johnmci at smalltalkconsulting.com
Sat Aug 12 21:41:43 UTC 2000


on 8/12/00 7:19 AM, Henrik Gedenryd at Henrik.Gedenryd at lucs.lu.se wrote:

> Bob Arning wrote:
> 
>> I just tried
>> 
>> SoundCodecPlugin translate
>> 
>> in 2.9a and got a walkback. An attempt was made to create a directory in the
>> Squeak directory called 'SoundCodecPrims', but that's also the name of the
>> plugin file and the Mac does not allow a file and a directory by the same
>> name
>> in the same directory. Is this one of those platform-specific issues? Or
>> something else?
> 
> Yes, this is a Mac issue, which ought to be fixed. I changed it to append '
> folder' to the name. Another workaround is to put your plugins in a Plugins
> folder, but that requires the fix I posted a while ago.
> 
> Henrik
> 
> 

Well it is a mac issue but also it's an issue with how the translation is
done. 

Normallly when  you translate the full Interpreter it invokes
Interpreter>> translate: fileName doInlining: inlineFlag forBrowserPlugin:
pluginFlag

This in turn invokes
plugin translate: plugin moduleName, '.c'
                    doInlining: doInlining
                    locally: true.

For each plugin in it's "official" list

InterpreterPlugin(class)>> translate: fileName doInlining: inlineFlag
locally: localFlag

Then builds a directory based on the fileName if localFlag is false.

So when building the full set of plugins they just get dumped into the
current directory. If you do say KlattSynthesizerPlugin translate
Then it sets localFlag to false and the code attempts to create a directory
which will fail if you've a plugin with the same name around.

The workaround is to do
KlattSynthesizerPlugin translateLocally

Which then sets localFlag to true and dumps the source file into the current
directory. 

However I've attached a change set that has a method called moduleDirectory
which then supplies a directory name to the translator so it can create and
dump files into something other than the modulename.


--
===========================================================================
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================
Custom Macintosh programming & various Smalltalk dialects
PGP Key: DSS/Diff/46FC3BE6
Fingerprint=B22F 7D67 92B7 5D52 72D7  E94A EE69 2D21 46FC 3BE6
===========================================================================

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/mac-binhex40
Size: 7868 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20000812/f7ae5378/attachment.hqx


More information about the Squeak-dev mailing list