[Pythonmac-SIG] For your eyes only: new 2.3rc1+ installer

Jack Jansen Jack.Jansen at cwi.nl
Wed Jul 23 23:51:05 EDT 2003


On woensdag, jul 23, 2003, at 18:07 Europe/Amsterdam, Alexandre 
Parenteau wrote:

> Jack,
>
> I don't know the severity, but just in case, here is an annoying issue 
> I run into yesterday : the different behavior of FSSpec for 2.2 CFM 
> and 2.3 Mach-O.
>
> One could argue that FSSpec is not necessary anymore, but it is still 
> very much alive as soon as you talk AppleEvents: think 
> CodeWarrior.make(projectfss, xmfss) for example.
>
> In 2.2 CFM, when you create a FSSpec from a path, the last component 
> doesn't have to exist in order for FSSpec to return a valid spec.

This is a known bug (#706592) that won't be fixed for 2.3. If you want 
to help: please do so! Suggestions appended to the bug report (or, 
better, a patch) will be gracefully accepted.

The problem is that, depending on your view, this is either (a) very 
hard or (b) impossible.
Very hard, because you cannot simply take the last bit of the pathname 
and stuff that into the FSSpec: pathnames are utf8, FSSpecs are 
MacRoman. And you have to convert : to /. Impossible, because you don't 
really know about the MacRoman bit, you'd really have to ask the 
filesystem about the encoding for this specific disk. And it is truly 
impossible if the last pathname component is more than 31 bytes.

For example code of the (a) variation check 
EasyDialogs.AskFileForSave() and think of converting that code from 
Python to C.

Actually, there might be a (c): possible but Jack overlooked something. 
If there's a way to go straight from pathnames to aliases, for 
instance, or something similar.
--
- Jack Jansen        <Jack.Jansen at oratrix.com>        
http://www.cwi.nl/~jack -
- If I can't dance I don't want to be part of your revolution -- Emma 
Goldman -




More information about the Pythonmac-SIG mailing list