[Pythonmac-SIG] New File, Folder and Alias managers

Jack Jansen Jack.Jansen@cwi.nl
Fri, 22 Nov 2002 17:03:25 +0100


Folks,
now that I have the new Carbon.File, Carbon.Folder and Carbon.Alias 
interfaces in place I come up against a problem.

In macfs things tended to follow the "logical object oriented" 
structure. For instance, NewAlias() was a method of an FSSpec object.

However, in the new situation FSSpecs will be defined in Carbon.File, 
while NewAlias() is defined in Carbon.Alias.

I think I can do one of two things:
1. Leave it as-is, i.e. you will have to call 
Carbon.Alias.NewAlias(fss) in stead of fss.NewAlias() in the future.
2. Lump the Alias module into the File module, and use some magic to 
make the methods work again.

Note that backward compatibility is solvable in the first case too: if 
I convert the toolbox modules to new-style objects the macfs 
compatibility module can define a type macfs.Alias that's derived from 
Carbon.Alias.AliasType and has the methods.
--
- Jack Jansen        <Jack.Jansen@oratrix.com>        
http://www.cwi.nl/~jack -
- If I can't dance I don't want to be part of your revolution -- Emma 
Goldman -