Re: [Pyobjc-dev] Supporting (NSString **) API (and the like)
Brought to you by:
ronaldoussoren
From: Jack J. <Jac...@or...> - 2002-11-26 23:28:13
|
On dinsdag, nov 26, 2002, at 17:37 Europe/Amsterdam, Bill Bumgarner wrote: > I ran across the need to call... > > - (BOOL)getInfoForFile:(NSString *)fullPath application:(NSString > **)appName type:(NSString **)type; > > ... today. Obviously, the appName and type parameters pose a problem. > Instead of trying to magically wrap 'em, how about simply creating a > category on [in this case] NSWorkspace that offers... > > - (NSDictionary *) pyobjcGetInfoForFile: (NSString *) fullPath; > > ... and the implementation simply returns a dictionary with the keys > 'application' and 'type'? > > The 'pyobjc' prefix will prevent namespace collisions and using a > category will continue to associate the functionality with the class. Good idea. And this also solves the issue about what to do for python-specific modules (a Python subpackage or a prefix): use a prefix there too. Even though I had a slight preference for a subpackage I think that if we use prefixes for methods that have no ObjC equivalent we should also use prefixes for modules that have no ObjC equivalent. -- - Jack Jansen <Jac...@or...> http://www.cwi.nl/~jack - - If I can't dance I don't want to be part of your revolution -- Emma Goldman - |