Re: [Pyobjc-dev] Re: [Pythonmac-SIG] pyobjc / cocoa
Brought to you by:
ronaldoussoren
From: Bob I. <bo...@re...> - 2002-10-17 18:01:59
|
On Thursday, Oct 17, 2002, at 12:24 America/New_York, Bill Bumgarner wrote: > > Convenience wrappers are in the works. Instead of wrapping, we are > thinking of simply providing a subclass of NSDictionary and NSArray > that can encapsulate DictType and Array/TupleTypes respectively. > That way, Python arrays and dicts will behave like normal NSArray / > NSDictionary instances on the ObjC side of the bridge. (The other > direction has already been bridged). > IMHO there should also be easy to use wrappers for NSNumber and NSData.. I use those on a pretty regular basis for stuff that needs to get serialized for DO or plists. Another extremely convenient idea would be to just make special cases for some of the most used Foundation classes such as NS[Mutable]Array, NS[Mutable]Dictionary and NSEnumerator so that you can treat them like native python objects. Possibly even NS[Mutable]String and so on. Probably wouldn't even take too long to develop, especially if it's done (at least at first) from the python end of the stick and not in ObjC. Does pyobjc do garbage collection? I'd imagine that you could have the __init__ for anything to a retain and the __del__ for anything do a release without getting in the way.. -bob |