Plugins and Platforms
tim at rowledge.org
Fri Nov 25 18:55:55 UTC 2005
On 25-Nov-05, at 10:43 AM, John M McIntosh wrote:
> On 25-Nov-05, at 3:47 AM, Bert Freudenberg wrote:
>> Hi folks,
>> when writing a plugin in Slang I encountered two problems wrt
>> platform specifics:
>> 1) convert a squeak pathname to a platform pathname:
>> * my plugin links to a library that expects a platform file path
>> * must convert from Squeak path (char encoding etc.)
>> * sqFilenameFromString() should do this
>> * PROBLEM: this does not work in an external plugin
>> * because it is just a macro pointing to some platform-code
>> function that would have to be linked to the external plugin
It took me enough effort just to get the macro incorporated many
years ago. On RISC OS the macro points to a nice function that has to
do a full canonicalisation proces to get the OS to work out the
proper filename. From recent discussions with John it sounds like
Apple desperately need to provide a similar OS call to save
application writers from losing all their hair.
>> * PROPOSAL: provide an ioFilenameFromString() function exported
>> from the VM
>> * looked up by plugin via interpreterProxy->ioLoadFunctionFrom
>> ("ioFilenameFromString", "")
>> * could trivially be implemented by using sqFilenameFromString
> This would be good, since the sqFilenameFromString is responsible
> (if in fact it does on all platforms) to translate from squeak file
> name encoding
> to platform character set dependent encoding.
I'll happily add this to the queue for the next VMMaker, but please
don't hold you breath. Blue is such an ugly colour for a human face.
Of course if this is a Sophie critical thing it can be done much sooner.
Likewise the endian stuff.
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
More information about the Vm-dev