2003-03-09 Bill Bumgarner * Lib/Foundation/__init__.py: Added declarations for all of the informal protocols in Foundation. 2003-02-28 Bill Bumgarner * Lib/AppKit/__init__.py: Added three (void) methods to NSTableViewDelegate and added NSOutlineViewDelegate. 2003-02-27 Bill Bumgarner * Lib/AppKit/__init__.py (NSTableViewDelegate): Added NSTableViewDelegate declaration and updated TableModel2 example. 2003-02-25 Bill Bumgarner * Restructured Modules/ to reflect the division between modules. Names are the same as their framework counterparts as much as possible. 2003-02-24 Bill Bumgarner * Moved code generation scripts to Scripts/CodeGenerators. Added a very basic README to CodeGenerators. * setup.py: Set USE_ADJUST_REFCOUNTS to 0 because that has been the behavior in the bridge for quite some time. 2003-02-15 Bill Bumgarner * Modules/objc/objc_support.m: Invocation now uses alloc/init instead of +invocationWith... class method. This prevents spurious "no pool, just leaking" errors from certain threaded situations. * Modules/Cocoa/NSAutoreleasePoolSupport.m: Fixed a really stupid memory leak in pop pool. 2003-02-06 Bill Bumgarner * Lib/Foundation/test/test_nsstring.py: Added another test from David E. that demonstrates issues with string encoding. 2003-02-04 Bill Bumgarner * Lib/AppKit/test/test_nscell.py (TestNSCell.testFloat): Added unit test from David Eppstein. * objc_support.m (depythonify_c_value): Now uses OC_PythonString to encapsulate strings. * OC_PythonString.m: implemented. Class should be optimized by covering the various random utility/extension methods in NSString's API as transparent call-throughs to the appropriate method/function on the encapsulated CFString. * OC_Python*.m: fixed -dealloc to call super. 2003-02-03 Bill Bumgarner * Lib/Foundation/test/test_nsundomanager.py: Added integer test from David Eppstein * _convenience.py: removed mapping of __repr__ to -description * Cocoa-Python Document-based Application: Fixed copy files phase and references to PyObjC module. 2003-02-02 Bill Bumgarner * Project Templates/clean.py: Added a simple script to clean the project template tree. 2003-02-01 Bill Bumgarner * Moved project templates to copy the PyObjC directory from site-packages. Fixed Web Services Tool example appropriately. * Lib/objc/_convenience.py: __repr__ and __str__ now both invoke -description. Not sure why __repr__ doing that was commented out before, but it seems to work-- same set of unit tests pass. * Lib/Foundation/Conversion.py: Now handles NSValue instances correctly [like NSNumber]. 2003-01-31 Just van Rossum * Added autoGIL extension module. It's a top-level module as it's not Cocoa- or PyObjC-specific. In fact it may end up in the Python distribution at some point. autoGIL.installAutoGIL() is called at the end of Foundation/__init__.py. This installs a callback in the CFRunLoop for the main thread, that releases the Global Interpreter Lock when the event loop goes to sleep, and acquires it again when it wakes up. This allows other Python threads to run while an app is inside the event loop. 2003-01-25 Bill Bumgarner * Modules/objc/libffi_support.m: Modified such that a Python based implementation can be stuck onto an objc class through the user of a closure to carry along the Python callable. See classAddMethods(). * Modules/objc/module.m: Added classAddMethods() * Lib/objc/test/test_methodedits.py: unit tests for classAddMethods(). One currently fails due to a bug in PyObjC. 2003-01-23 Bill Bumgarner * setup.py (USE_FFI): Enabled FFI. Refactored setup.py slightly to push FFI configuration to top. 2003-01-20 Bill Bumgarner * Lib/Foundation/Conversion.py: Fixed tests to ensure that "" and 0 are not counted as None. 2003-01-18 Just van Rossum * Make AppKit.NSApplicationMain() propagate exceptions back to Python. * Include the entire exception info (type, value and traceback) when converting a Python exception to an NSException. This is needed to get a complete traceback. 2003-01-18 Ronald Oussoren * Remove the PyOBJC_UNIQUE_PROXY option, it is always on anyway. * Remove mechanism for registering methods that return a 'new' instead of a 'borrowed' reference. This mechanism is too simplistic. * Initial support for special support of init methods: These return self, and if they don't the old value of self probably is no longer valid. * Bugfixes in libffi support * Some performance enhancements, the effects are fairly minor. I'm not too happy about the new version for objc_methodlist_magic, I'll probably revert this change later on. * Add workaround for a feature of NSData: x = NSData.alloc() y = x.initWithBytes_len_(foo, bar) The initWithBytes_len_ call above acts like realloc(): 'x' might no longer be a pointer to a valid object. * Add .pyobjc_classMethods, .pyobjc_classMethods and .pyobjc_instanceMethods. The attributes of these attributes are the class and instance-methods of the or . * Typo in "Project Templates/00README.txt" 2003-01-18 Bill Bumgarner * Modules/objc/OC_PythonDictionary.m ([OC_PythonDictionary -objectForKey:]): Fixed -objectForKey: to return nil if key did not exist (previously, it would segfault). This mimics NSDictionary behavior. * Lib/Foundation: moved conversion functions to their own module; Conversion. collections unit test now tests conversion and conversion helpers. 2003-01-17 Bill Bumgarner * Lib/objc/_convenience.py (enumeratorGenerator): Busted by the language police! 2003-01-16 Bill Bumgarner * Lib/objc/_convenience.py: Fixed enumeratorGenerator() to test nextObject against None. This fixes a bug where an empty string in an array would terminate enumeration even if there were objects after the empty string. 2003-01-14 Bill Bumgarner * Lib/AppKit/__init__.py (NSApplicationDelegate): Added NSApplicationDelegate definitions. * Modules/Cocoa/_AppKit.m (objc_NSApplicationMain): Evil hack to fix bug in NSApplicationMain()'s lack of argument processing. Evil Evil hack, but it works. 2003-01-13 Bill Bumgarner * Lib/objc/_convenience.py: Added support for NSEnumerator [for x in enum:] and cleaned up other convenience methods. 2003-01-11 Bill Bumgarner * setup.py (req_ver): Moved back to non-ffi build (I believe the move to ffi was an unintentional change?). * Modules/Cocoa/_AppKit.m: Added bridging of NSRectFillList. API should be in GNUstep? (objc_NSRectFillList): Fixed short-circuit where rectCount is 0. 2002-01-06 Ronald Oussoren * Merged the second halve of Mirko's patch: Changes to Modules/Cocoa * I've done some updates to make ensure that there are no patches to generated files. 2003-01-06 Bill Bumgarner * Doc/coding-style.txt: Added more information about ReST. Some cleanup. * Modules/objc/module.m: Added convenience function to allocate a buffer via PyBuffer API (result is a buffer with a fixed length / location -- useful with NSData and NSBIR). * Modules/Cocoa/NSAutoreleasePoolSupport.m: Now thread safe. 2003-01-05 Bill Bumgarner * test_nsbitmapimagerep.py: Data test now passes. Deeper investigation revealed that there is no easy way to unify the types passed into an NSBIR and what is returned by -bitmapData/-getBitmapDataPlanes. Namely, there is no way to produce a read/write buffer from an array.array() without dipping directly into the C API. 2002-01-05 Ronald Oussoren * Merged initial version of GNUstep support by Mirko Viviani * This patches only Modules/objc and setup.py. Mirko also sent a patch for Modules/Cocoa, I'll merge that later. 2003-01-04 Bill Bumgarner * CocoaApp.pbproj/TemplateInfo.plist: Added description text. * Modules/Cocoa/_AppKitMapping.m: Added AppKitMapping as new module in setup.py (why wasn't it there before?). Added support for NSImageBitmapRep. Can now create a bitmap rep w/many arg designated intiailizer and can invoke -getBitmapDataPlanes. Unit test included. array instances returned by -getBitmapDataPlanes are mutable and, as such, it is now possible to edit/manipulate NSIBR directly in Python. * _AppKitMapping.m: Improved error messages for not-yet-supported methods and fixed calls to super. Fixed up unit test. Added initial support for -bitmapData. 2003-01-03 Bill Bumgarner * Modules/objc/objc_support.m: Augmented error message for Unhandled type. 2003-01-03 Ronald Oussoren * Added methods to objc/_convenience that allow us to use NSArray.arrayWithObjects_ and other varargs constructors (by calling non-varargs versions under the hood) 2003-01-03 Bill Bumgarner * Scripts/runalltests: also check to make sure file ends with '.py' (to avoid '.py~' files. * Modules/Cocoa/_FoundationMapping.m: Started moving the various class specific method registrations to separate source files but static variables defeated me. * Lib/Foundation/test/test_nsdata.py: Added test for NSData class cluster (including NSMutableData). Refined tests a bit; test for more conditions and for situations that should raise an exception. * NSData: Added support for -bytes. * NSMutableData: Added support for mutableBytes * NSData: Added support for +dataWithBytes:length: 2003-01-01 Bill Bumgarner * Project Templates/Cocoa-Python Application/bin-python-main.m: Added Cocoa/Cocoa.h in hopes that it'll fix indexing. * Project Templates/Cocoa-Python Application/CocoaApp.pbproj/TemplateInfo.plist: Added __main__.py, removed Main.py * Examples/CurrencyConverter/00README.txt: Created a simple README describing how to build the CurrencyConverter example.s a * Examples/addressbook.py (me): Checked to make sure there is really a 'me' card in the address book. If the user hadn't marked a card as 'This is my card', the script tossed an exception. 2002-12-23 Ronald Oussoren * Automaticly convert 'self' argument to Objective-C if it is a Python string, or int (just like for other arguments). This allows calls like >>> NSString.localizedCaseInsensitiveCompare_('foo','bar') 2002-12-22 Ronald Oussoren * Introduce support for libffi. For now the only advantages are a faster build and smaller libraries. 2002-12-19 Bill Bumgarner * RELEASE 0.8 * Modules/Cocoa/_Foundation.m (and others): Added #ifdefs that will only import the files if on 10.2 or greater. This provides the foundation for 10.1 compatibility, but the autogenerators and other pieces need to be put into places. 2002-12-17 Bill Bumgarner * Project Templates/Cocoa-Python Application/MyAppDelegate.py: Moved to AutoBaseClass. Added significant documentation. * Project Templates/Cocoa-Python Application/bin-python-main.m: Integrated all of Jack's, Ronald's and my suggestions/patches/changes (that I could remember). * Project Templates/Cocoa-Python Application/__main__.py: Brought in line with Web Services Tool example. Minimized the # of lines. * setup.py: Added test directories. * MANIFEST: Completely redid. * Scripts/buildpkg.py (PackageMaker.build): Tried to add RootOnly install flag. Won't work until we move to new style packaging format. * ReadMe.txt: Added brief note about installing the packaged version. * Scripts/make_distrib.py (fd): Numerous changes. Final products are built into a directory that can be directly disk imaged. Directory contains readme, license, and changelog. Package now contains developer examples. More cleanup of spurious files from trees to be packaged. * Cleaned up Cocoa-Python template; synchronized with WebServicesTool example. Added lots of comments. 2002-12-15 Ronald Oussoren * Erase reference to the Python half before doing the [super release] call that will release the Objective-C half of an instance of a Python subclass of an Objective-C class. This way we can't accidently call into the, already dead, python object. 2002-12-08 Bill Bumgarner * Examples/WebServicesTool: Added a lot of inline documentation to the python code. * BUGS: Removed some of the already fixed bugs. Removed legacy information that is no longer relevant. Added new bugs. Added information to existing bugs. * FIXME: Edited to bring some stuff up to date. * Lib/Foundation/test/test_nsautoreleasepool.py (suite): Added unittest to test NSAutoreleasePool bug workaround. * Modules/Cocoa/NSAutoreleasePoolSupport.m: Added bogus push/pop workaround for NSAutoreleasePool bug. * INSTALL: Rewrote a good chunk of the text. Removed references to NeXTSTEP.hange * Examples/HelloWorld.py: Reworked example a bit to match modern usage. - References classes through AppKit/Foundation, not by looking up directly. - Added an action method to Hello button so it does something even when sound is turned off. * Modules/objc/module.m: Fixed import in module.m; wrong case. 2002-12-01 Bill Bumgarner * cleaned up nsobject unittests slightly [had cruft from nsarray] * added NSAutoreleasePool test 2002-11-27 Bill Bumgarner * make_distrib.py automatically removes CVS directories and .DS_Store files from tree before packaging. 2002-11-25 Ronald Oussoren * Examples/{TableModel, CurrencyConverter, Todo}: - Use NibClassBuilder module - Use bundlebuilder module * Lib/objc/builder.py: Remove, no longer used 2002-11-22 Ronald Oussoren * Examples/TableModel2/main.m: Set PYTHONPATH in the environment of the child * Import bundlebuilder.py and plistlib.py from MacPython * Remove Tools/mknibwrapper: It is no longer needed * Added scripts/nibclassbuilder, as suggested by Just van Rossum 2002-11-20 Ronald Oussoren Translated a number of names to a more Cocoa like syntax: * objc.lookup_class -> objc.lookUpClass * objc.class_list -> objc.getClassList 2002-11-18 Ronald Oussoren * Doc/classes.txt: new file documenting how classes work * Lib/objc: Reformatted (4-space indent) and remove superfluos whitespace 2002-11-17 Bill Bumgarner * Normalize whitespace * allow extractClasses() to be called multiple times for one nib (well it was allowed, but now less double work is performed) * renamed NibClassBuilder to _NibClassBuilder: AutoBaseClass is not the way it's done. * added module doc string and variaus method doc strings * renamed loadClassesEtc. to extractClasses(), has a signature is as discussed on the list (ie. can parse nibs by name or by path) * Changed name of NibLoader to NibClassBuilder [Changes from Just van Rossum -- bbum acting as proxy because Just's sourceforge account is broken] 2002-11-15 Bill Bumgarner * Fixed a minor bug in NibLoader.py when specifying NIBs without the .nib extension 2002-11-15 Ronald Oussoren - Modules/objc: Remove sel_class_method and sel_allocator from selector objects, and introduce a sel_flags. - Modules/objc/selector.m: Add Python visible attributes that allow reflection to access more information about selectors/methods. - Modules/objc/selector.m: donate_ref attribute is writable, allowing python code to update this flag. Should be used only in setup code. - Also check for updated Objective-C method-tables in obj.__getattr__, PyObject_GenericGetAttr directly pokes into the class __dict__ instead of calling objc_class.__getattr__. 2002-11-15 Bill Bumgarner * Changed the names of various methods from loadNib to loadClassesForNib to better follow the Cocoa APIs. * Just rewrote the NibLoader.py; added the new version. * Modified NibLoader to not generate a class for FirstResponder. * Integrated Just van Rossum's NibLoader script into the module. 2002-11-13 Ronald Oussoren * Added workaround for 1 of the problems with NSTextView 2002-11-11 Bill Bumgarner * Fixed spelling error in NSComboxBoxDataSource definition. 2002-11-11 Ronald Oussoren * Lib/objc/__init__.py: Don't remove current directory from sys.path 2002-11-08 Ronald Oussoren * Use integer for lots of userInfo arguments in the AppKit 2002-11-08 Bill Bumgarner * Cleaned up the Cocoa-Python project template. 2002-11-05 Bill Bumgarner * added an NSNumber test 2002-11-02 Bill Bumgarner * Change addressbook example to be in line with updated convenience methods. 2002-10-31 Ronald Oussoren * Use 'nibwrapper' technique in all GUI examples. * Actually remove old version of classnib.py and add the version in the new location (as used by Tools/mknibwrapper) 2002-10-31 Bill Bumgarner * Fixed a typo in NSOutlineViewDataSource. * Fixed the classnib.py script slightly. * Added support for NSSet in the convenience methods. 2002-10-30 Bill Bumgarner * Many, many changes to the convenience methods in the objc module. Wrote a bunch of tests in test_nsarray and test_nsdictionary. * Fixed a bug in the NSDraggingDestination method declarations and made all of the methods optional (the developer only needs to implement a subset of the methods and none of the methods are required to be a part of that subset). * Fixed 'in' operation on arrays to use containsObject:. Should work with sets. Will not work with NSDictionary. * Fixed enum parser to handle enums that don't start with a typedef. Regenerated appkit and foundation enumerated types files to pick up missing enums. * Added some tests and cleaned up a bit of the existing tests in test_subclass.py 2002-10-30 Ronald Oussoren * Fix memory corruption bug * Add Obj-C exception handling around calls to ObjC_FindNative, this avoids an unhandled exception when during: help('Foundation') I didn't add a testcase for this as the above code takes a _very_ long time to execute. * Some minor code cleanup (mostly removal of print statements) * Reset '__module__' of classes in the __init__.py of AppKit and Foundation. help(AppKit) now works (and generates an lot of output) * pythonify_c_value("@", ...) now correctly process Class objects. * Modules/objc/class-builder.m: Can't just call objc_msgSendSuper({ self->super_class->isa, self }, ...), that won't work when we are the super-class of self... * lib/objc/test/test_subclass.py: Added testcases for above * Digits are valid characters in Objective-C classnames, class-builder.m incorrectly assumed they are not. * Lib/objc/_convenience.py: It is now possible to add multiple convenience methods when an Objective-C selector is present, use this to provide better wrapping of NSDictionary * Lib/AppKit/classnib.py: Moved from Lib/objc/classnib.py, removed custom parser and use NSDictionary instead. * Tools/mknibwrapper: Script using AppKit.classnib for generating a module declaring base classes for classes defined in NIB files. * Examples/{TableModel,iClass}: Use script above 2002-10-29 Bill Bumgarner * Fixed a bug in convenience method that covered objectForKey:. Wrote a unit test that failed due to the bug (test_nsdictionary.py), then fixed _convenience.py to fix the problem. 2002-10-28 Ronald Oussoren * Doc/wrapping.txt: New file containing basic documentation on how to wrap an Objective-C class library. 2002-10-25 Ronald Oussoren * Improved inline documentation 2002-10-25 Bill Bumgarner * Changed the objc_support.m to compile in the invocation tear down code. 2002-10-24 Bill Bumgarner * Fixed up web services tool example slightly. * Changed objc_selcall to not release allocator method returns. Not sure if this is absolutely correct, but if fixes a bunch of code that had been implemented in a standard pattern. * Added a number of NS* tests. * "Fixed" a crasher that would happen after the second time a collection class was alloc()'d. 2002-10-23 Bill Bumgarner * Added a test_paths test suite to Foundation. Tests one function (currently causes a bus error). 2002-10-22 Bill Bumgarner * Split Foundation unit tests into two suites. * Updated objc unit tests a bit. * Added Foundation unit tests. * Moved a number of tests from objc -> Foundation. * Updated the MANIFEST (too bad we can't effectively use MANIFEST.in) * Slight correction/addition to setup.py * Added basic unit tests to objc. * Implemented __ne__ in terms of isEqual_ (not isNotEqual_). * Added unit test that tests that an object is equal to itself. 2002-10-21 Ronald Oussoren * scripts/buildpkg.py: Import from Python 2.3 CVS, with one minor bugfix * scripts/make_distrib.py: Create source archive and installer * Modules/objc/register.m: Add signature that is needed to write system services in Python. 2002-10-18 Bill Bumgarner * Fixed the -dealloc method in OC_PythonDictionary. * Disabled gc in objc's __init__.py (I thought we had done this in the past, but it seems to have gotten lost) only for python 2.2.x. * Replaced all occurrences of True and False to 1 and 0 in Ronald's previous changes. * Changed TableModel2 example to be like TableModel example 2002-10-18 Ronald Oussoren * Better fix for crash while converting exception from Python to Objective-C * Code cleanup in OC_*.[hm], ObjCPointer.m * Cleaner code to check if the Objective-C class has a changed method table. * Native selectors now have a 'defining_class' attribute, which contains a reference to the class that defined this method. * Added type objc.informal_protocol, which can be used to eliminate most existing cases of explicit calls to 'objc.selector' * Adding methods like __getitem__ to Objective-C class proxies is now done using python code. This should make it easier to change the implementation (and: less C code ==> good) 2002-10-17 Bill Bumgarner * Fixed a situation where ObjCErr_ToObjC() would crash if the exception lacked a value or traceback. * propertyListFromPythonCollection() takes an optional kv argument that is used as a helper function when the type to be converted in the python collection is not recognized. For example, the xmlrpclib returns a [somewhat inadequate] internal type known as a DateTime. To convert this to a Foundation class requires some jumping through hoops that may change a bit during context. The caller can provide a helper function to do the conversion. 2002-10-16 Bill Bumgarner * NSClassFromString() was implemented twice in the Foundation's __init__.py. The second implementation was supposed to be NSStringFromClass(). Fixed. * Added propertyListFromPythonCollection() function to Foundation. It converts a Python collection (string / dict / array / tuple / numbers) into a corresponding tree of Obj-C NSString / NSDictionary / NSArray / NSArray / NSNumber instances. 2002-10-15 Ronald Oussoren * Exceptions are now transparently transfered to the other language. Upon transitioning back into the source language the exception regains its orginal 'identity' 2002-10-11 Bill Bumgarner * Removed various debugging/development noise from startup. * Regenerated various incs in Modules/Cocoa based on new scripts. * Updated Examples/WebServicesTool to be compatible with Apple supplied Python. Created a new main() implementation that transfers control to '/usr/bin/python' via execve(). * Modules/Cocoa/scripts: Modified all scripts to use 0/1 instead of False/True for compatibility with Python 2.2. Modified scripts that generate a table of information to emit the 'static' keyword at the head of the declaration. This fixes a namespace collision with the Apple supplied Python. 2002-10-10 Ronald Oussoren * Modules/objc/objc-class.m: Implemented a 'class_traverse' function For some reason Python 2.2.0 crashes when we inherit tp_traverse from PyTypeObject AND the ObjCClass is not fully constructed. * MANIFEST: Updated to current situation * README: Apple python now seems to work 2002-10-09 Ronald Oussoren * Move Cocoa.AppKit and Cocoa.Foundation packages to AppKit and Foundation * Some backward compatibility code for Python 2.2.0. This includes disabling the GC module for now: This module interacts badly with us. 2002-09-28 Ronald Oussoren * objc-class.m: Actually implement the selector->python cache, this significantly speeds up method dispatch (iClass is now pretty snappy) 2002-09-23 Ronald Oussoren * Changelog: fix my e-mail address. * setup.py: Check for a framework install of python on MacOS X * setup.py: Check for Python 2.3 or later * OC_PythonObject.m: Remove debug printf statements * class-builder.m: - Use alloca instead of malloc for small buffers - Use signature string from the Python wrapper of a class, instead of reading it directly from the Objective-C class: The user may have specified a better signature. * objc-class.m: - Add 'tp_compare' and 'tp_hash' special methods. - Fix memory leak in ObjCClass_FindSelector * objc_support.m: - Add support for unicode strings - In depythonify_c_value: do nothing if output buffer is NULL - arguments arena support is completely disabled. As a side-effect, _C_PTR values inside structures/arrays are no longer translated to/from python. * objc_util.m: Translate some Cocoa exceptions into Python * selector.m: - Remove debug printfs - Actually add implementations for ObjCSelector_Signature and ObjCSelector_Selector * super-call.m: - The python wrapper for an Objective-C method might know a better signature than the method itself. * Modules/Cocoa: - Copied later version, including some more constants. * Lib/objc/__init__.py: - Re-enable __setitem__ special method for objects with setObject:forKey: - IBAction is now a function - If we are a '.app' add the Resources directory to the python search-path (and at the front), and remove the '.' that is normally at the front. * Lib/objc/_FoundationSignatures.py - Add better signatures for a number of methods * Lib/objc/builder.py: Remove invalid comment * Examples/iClass: New example (Cocoa class browser) 2002-09-15 Ronald Oussoren * Fix a number of memory leaks. There are still some leaks left. * Some minor cleanups * Documentation about reference counts. 2002-09-08 Ronald Oussoren * Redid the merge, the directory structure has been reorganised to better reflect the importance of the modules for Cocoa programming. 2002-08-09 Ronald Oussoren * this is the start of the merge of an experimental and completely seperate branch. 2002-01-30 Steve Majewski * will now build for Python 2.2 (includes a #define to correct bug in Python-2.2 abstract.h) * Cocoa package containing Foundation and AppKit added to HelloWorld.py in Examples. MANIFEST and setup.py updated. * PyObjC_Version changed to 0.6.1 (and ObjC.m changed to make __version__ a string.) * OC_PythonObject.m addes NS_HANDLER code to try to catch problem code, but now it just dies with a BusErr somewhere after the exception. 2002-1-22 Steve Majewski * setup.py : added -g flag to compile for debugging * ObjC.m : -v flag now dumps message sends to /tmp file * ObjCObject.m : added ISCLASS test before isKindOfClass - without check, it crashes on sends to abstract classes like NSProxy. Removed previous hack that wrongly commented out some [super forwardInvocation] messages. * Examples/HelloWorld.py : fixed spelling and inserted missing line. 2001-04-05 Steve Majewski * ObjC.h,objc_support.m,ObjCMethod.m: Changed conditional code for Mac OSX. ObjC.h conditionally defines MACOSX and other modules use that #ifdef. * ObjC.h (PyObjC_VERSION): Version 0.6. 2001-03-17 Bill Bumgarner * changed name of imported module to pyobjc to be more consistent with other modules (that typically have an all lower case name). * removed all old style Makefile and configuration stuff and moved to using setup.py. Setup.py proves to be much easier to handle in a cross platform fashion and requires fewer steps to build the moudle. 1998-08-18 Lele Gaifax * objc_support.h (ISCLASS): Check against META flag, an object is a class when its class pointer points to a metaclass... * ObjC.m (initObjC): Disabled the autorelease support: have to wait to patch Python for that. * OC_PythonObject.m ([OC_PythonObject -forwardInvocation:invocation]): use argumentInfoAtIndex: * ObjCMethod.m (ObjCMethod_pack_argument): likewise. * Here and there: I give up: make gcc happy by using #include, not #import... * Makefile.pre.in (static): Use $(OCC) to link the executable. * objc_support.h: Removed warning on GNUstep not supported... Tue Mar 24 19:56:46 1998 Lele Gaifax * ObjC.h (PyObjC_VERSION): Version 0.54. Sat Jan 17 00:49:29 1998 Lele Gaifax * OC_PythonObject.h (@interface OC_PythonObject): Now derived from NSProxy. Sat Jan 10 13:22:31 1998 Lele Gaifax * INSTALL: Added shared module recipe. Thu Jan 8 20:20:32 1998 Lele Gaifax * ObjC.h: Removed ObjCStream declaration. Sun Jan 4 17:28:55 1998 Lele Gaifax * ObjC.h (PyObjC_VERSION): Version 0.53. * Demo/LittleButtonedWindow/LittleButtonedWindow.py (run): Import ObjC before AppKit, so that the '-[' option is not needed. * ObjC.m (initObjC): Be sure the AutoreleasePool is instantiated. * ObjCObject.m (ObjCObject_call): use instancesRespondToSelector:. Mon Dec 29 15:34:57 1997 Lele Gaifax * ObjC.h: Removed ObjCSequenceObject_Type and ObjCMappingObject_Type. Sun Dec 28 19:51:28 1997 Lele Gaifax * ObjC.m (ObjC_load_object_files): Removed. (ObjC_list_classes): Removed. * ObjCRuntime.m (ObjCRuntime_methods): Likewise. * ObjCRuntime.m (ObjCRuntime_getattro): Renamed ``kind'' to ``__kind__''. (ObjCRuntime_getattro): Removed ``__dict__'', added ``__objc_classes__''. * OC_PythonObject.h: Renamed from the anonymous ``object''. Fri Dec 26 20:55:39 1997 Lele Gaifax * ObjC.h (PyObjC_VERSION): Version 0.52. Mon Dec 22 20:07:49 1997 Lele Gaifax * objc_support.m (pythonify_c_value): If the object is an NSString, return a corresponding PyString. (depythonify_c_value): If the expected type is an ObjC object and we have a PyString, convert it in a corresponding NSString. (execute_and_pythonify_objc_method): if the method returns void, return Py_None. * ObjCMethod.m (ObjCMethod_new_with_selector): Trap bad selectors. (ObjCMethod_pack_argument): Reenabled. (ObjCMethod_unpack_argument): Likewise. Tue Dec 16 19:46:07 1997 Lele Gaifax * ObjC.h (PyObjC_VERSION): Version 0.51. Tons of changes, dropped NeXTSTEP runtime support, renewed around the new OS API. Wed Apr 16 23:53:37 1997 Lele Gaifax * PyObjC.fproj/ObjC.h (PyObjC_VERSION): Version 0.48, first running on OpenSTEP! Thu Apr 10 22:14:03 1997 Lele Gaifax * ObjC.fproj/ObjC.h (WITH_FOUNDATION): Simplified variants selection. Wed Apr 9 19:19:30 1997 Lele Gaifax * ObjC.fproj/OC_PythonObject.m ([OC_PythonObject -forward:aSelector:argFrame]): Removed GNU_RUNTIME support. Mon Apr 7 18:19:52 1997 Lele Gaifax * Demo/ObjC/AlertPanel/AlertPanel.h: Include OC_PythonObject.h, not PythonObject.h. Thanx Andrew Robinson . Sun Mar 23 22:49:12 1997 Lele Gaifax * Modules/makesetup: Allow -f (for frameworks) as a library flag within module rules. Tue Mar 18 19:50:05 1997 Lele Gaifax * Modules/makesetup: Added an option -M to change the name of the created Makefile. Fri Nov 15 09:12:01 1996 Lele Gaifax * Modules/objc_support.m (depythonify_c_value): Don't check the string size for arguments of type (void *). * Modules/OC_Pasteboard.m (-setData:forType:): DATA must be a kind of OC_Stream. Sun Nov 10 09:27:45 1996 Lele Gaifax * Include/ObjC.h, Include/OC_PythonObject.h, Include/OC_PythonBundle.h, Include/OC_Pasteboard.h: Untabified. Sat Nov 9 19:08:31 1996 Lele Gaifax * Modules/OC_Stream.m, Modules/OC_PythonObject.m, Modules/OC_PythonBundle.m, Modules/OC_Pasteboard.m, Modules/ObjCStreams.m, Modules/ObjCRuntime.m, Modules/ObjCPointer.m, Modules/ObjCObject.m, Modules/ObjCMethod.m, Modules/objc_support.m, Modules/ObjC.m: Untabified. Tue Oct 29 10:33:43 1996 Lele Gaifax * Include/ObjC.h (PyObjC_VERSION): Version 0.47. Mon Oct 28 16:38:52 1996 Lele Gaifax * Modules/ObjC.m: Splitted. * Modules/ObjCRuntime.m: New file. * Modules/ObjCMethod.m: New file. * Modules/ObjCObject.m: New file. * Modules/ObjCPointer.m: New file. * Demo/ObjC/ShellText/ShellText_SingleUnderscore.py (main): Likewise. * Demo/ObjC/ShellText/ShellText.py (main): With a command line argument, show that file. Accepts also a -t|--title option. * INSTALL.PyObjC: Updated. * Misc/Makefile.pre.in (TARGET): set to pyobjc. Sun Oct 27 11:55:53 1996 Lele Gaifax * Modules/ObjC.m (ObjCObject_sq_ass_item): Implemented. * Modules/OC_PythonObject.m (+newWithObject:): If the object is an ObjCObject, return the wrapped Objective-C object without creating a new instance. Sat Oct 26 13:13:41 1996 Lele Gaifax * Modules/ObjC.m (ObjCSequenceObject_methods): New methods on sequence objects. (ObjCMappingObject_methods): New methods on mapping objects. * Modules/objc_support.m (pythonify_c_value): If an obj is a kind of OC_Stream, wrap it in a ObjCStream, not in a generic ObjCObject. (depythonify_c_value): viceversa. * Modules/ObjCStreams.m (ObjCStream_new): New function. * Misc/Makefile.pre.in: Added $(LINKFORSHARED) to link command. Fri Oct 25 15:08:23 1996 Lele Gaifax * Modules/ObjC.m (ObjCSequenceObject_Type): New invisible type with sequence access. (ObjCMappingObject_Type): New invisible type with mapping access. (ObjCObject_new): If an object is a sequence (responds to -length and -objectAt:) use ObjCSequenceObject_Type. If it is a dictionary (responds to -length and -valueForKey:) use ObjCMappingObject_Type. * Doc/libObjC.tex (subsection{ObjCObject objects}): Tell about sequence and mapping access syntax. * All sources: slightly better methods documentation, as well as better error messages for PyArg_ParseTuple(). Thu Oct 24 14:23:04 1996 Lele Gaifax * Include/OC_Pasteboard.h: Now all methods are in a category of the Pasteboard class. OC_Pasteboard is gone. * Modules/OC_PythonObject.m (-count): New method. * Modules/ObjC.m (ObjCObject_Type): added sequence capabilities. Sat Oct 19 11:56:40 1996 Lele Gaifax * Modules/Setup.PyObjC.in (ObjC): Refer to sources in Modules. Fri Oct 18 14:12:00 1996 Lele Gaifax * Include/ObjC.h (PyObjC_VERSION): Version 0.46. * Doc/libObjCStreams.tex: Tell the difference between NeXTSTEP and OpenStep implementation of OC_Stream. * Doc/libPyObjC.tex: Include libObjC and libObjCStreams. * INSTALL.PyObjC: Updated. Thu Oct 17 18:10:46 1996 Lele Gaifax * Include/OC_Stream.h (@interface OC_Stream): (WITH_FOUNDATION) now is a subclass of NSData. * Modules/OC_Stream.m (-freeWhenDone:): new method. (+newFromMemory:length:withMode:): use it. (+newFromFilename:withMode:): idem. * Include/OC_Stream.h (@interface OC_Stream): openByUs renamed freeWhenDone. * Modules/Setup.PyObjC.in (ObjC): Added OC_Pasteboard.m. * Modules/objc_support.h (depythonify_objc_message): sped up. (pythonify_objc_message): idem. Wed Oct 16 19:50:46 1996 Lele Gaifax * Modules/Setup.PyObjC.in (ObjC): Added OC_PythonBundle.m * Modules/ObjC.m (initObjC): Force the load of OC_PythonBundle. Tue Oct 15 09:12:37 1996 Lele Gaifax * Modules/ObjC.m (ObjCMethod_unpack_argument): Was passing a PyStringObject instead of the cstring itself to sprintf(). (ObjCObject_getattr): Print the warning only the first time the method gets fetched. * Modules/OC_Python.m: Dropped. It was used just as a shortcut for the Setup file. * Include/OC_Python.h: Idem. * Modules/Setup.PyObjC.in (ObjC): Removed OC_Python.m, added PythonObject.m OC_PythonInt.m OC_PythonString.m. Mon Oct 14 15:48:58 1996 Lele Gaifax * Include/ObjC.h (PyObjC_VERSION): Version 0.45. * Doc/libObjC.tex: Describe the single-underscore syntax. Thu Oct 10 11:11:21 1996 Lele Gaifax * Include/OC_Stream.h: Renamed +newFromMappedFile: to +newFromFilename:. Rename -saveToFile: to -saveToFilename:. * Modules/ObjCStreams.m (ObjCStream_seek): Use the renamed method. * Include/OC_Stream.h: Renamed -setStreamPosition:from: to -setStreamPosition:seekMode: for uniformity with GNUstep. * Modules/ObjCStreams.m (ObjCStream_dealloc): test for WITH_FOUNDATION, not GNU_RUNTIME. (STREAM_.*DURING.*): Simplified and implemented Foundation variants. * Modules/objc_support.h: stub support for OpenStep. Wed Oct 9 10:46:50 1996 Lele Gaifax * Include/ObjC.h (PyObjC_VERSION): Version 0.44. Tue Oct 8 18:02:58 1996 Lele Gaifax * Modules/ObjC.m (ObjCPointer_unpack): Check for void *. (ObjC_methods): new method make_pointer, to create arbitrary pointer objects. * Modules/objc_support.m (depythonify_c_value:_C_DBL): accepts an integer value too. (depythonify_c_value:_C_FLT): likewise. Mon Oct 7 14:46:35 1996 Lele Gaifax * Include/ObjC.h (PyObjC_VERSION): Version 0.43. * Modules/Setup.PyObjC.in: Added ObjCStreams.m. Fri Oct 4 16:53:41 1996 Lele Gaifax * Include/ObjC.h (PyObjC_VERSION): Version 0.42. * Modules/ObjC.m: ObjCStream objects implementation. * Modules/objc_support.m (pythonify_c_value): Hack to support passing NXStreams as ObjCStream objects. (depythonify_c_value): likewise. Thu Oct 3 12:42:30 1996 Lele Gaifax * Modules/ObjC.m: Moved BUGS section to BUGS.PyObjC. (ObjCObject_call): Support for initialization arguments. * README.PyObjC: splitted, creating INSTALL.PyObjC and NEWS.PyObjC. * Modules/makesetup: Little note to explain my changes. : Undone */* hack on source names. Silly me! I should never fix something too early in the morning ;-) * Modules/Setup.PyObjC.in: Sources are in the Modules/ directory. Wed Oct 2 12:36:10 1996 Lele Gaifax * Include/ObjC.h (PyObjC_VERSION): Version 0.41. * Misc/Makefile.pre.in: Fits PyObjC needs. * Modules/ObjC.m (ObjCMethod_pack_argument): Return an ObjCPointer object, not a string. (ObjCMethod_unpack_argument): Accepts ObjCPointer objects as well as strings. * Modules/objc_support.m (objc_skip_typespec): Corrected _C_UNION_B branch: unions are not prepended by their tag like structures. (objc_alignof_type): likewise. (objc_sizeof_type): likewise. (pythonify_c_value): Support _C_UNIONs by translating them to strings. (depythonify_c_value): Likewise, accepting a string of the right size. (pythonify_c_value): Use ObjCPointer to encode pointers, do not pythonify the content of the pointed value. Fri Sep 27 17:10:12 1996 Lele Gaifax * Modules/objc_support.m (execute_and_pythonify_objc_method): Show the expected ObjC type in the error message for type mismatch. * Modules/ObjC.m (ObjCMethod_pack_argument): likewise. (ObjC_lookup_class): better error message. (ObjCRuntime_getattro): Set the error message if the class cannot be found. (ObjCMethod_pack_argument): Reset the buffer if the value is not given. Fri Sep 27 11:40:04 1996 Lele Gaifax * Include/ObjC.h (PyObjC_VERSION): Version 0.4. * Modules/ObjC.m (ObjCRuntime_sel_is_mapped): Implemented. * Modules/objc_support.m (execute_and_pythonify_objc_method): Handle floats and doubles return values. Thu Sep 26 10:45:36 1996 Lele Gaifax * Include/ObjC.h (PyObjC_VERSION): Version 0.31. * Modules/ObjC.m (ObjC_list_classes): Oops! Use DECREF not INCREF on item. * Modules/objc_support.m (execute_and_pythonify_objc_method): For consistency, refer to the first argument as 0, not 1. * Modules/ObjC.m (ObjCRuntime_getattro): Added 'kind' member, which is set to ``GNU'' if using the GNU runtime, ``NeXT'' otherwise. Tue Sep 24 12:40:18 1996 Lele Gaifax * Modules/OC_PythonObject.m (get_method_for_selector): To support the single underscore notation, always pythonify the objc message. * Modules/objc_support.h (pythonify_objc_message): Support for single underscore notation. (depythonify_objc_message): likewise. Fri Sep 20 12:03:22 1996 Lele Gaifax * Include/ObjC.h (PyObjC_VERSION): Version 0.3. * Modules/ObjC.m (ObjCMethod_pack_argument): Implemented GNU_RUNTIME support. (ObjCMethod_unpack_argument): Likewise. * Modules/OC_PythonObject.m (-forward::): Banalized: removed check against the runtime, since it was in any way a guess. Also, support the GNU runtime. * Modules/objc_support.m (execute_and_pythonify_objc_method): If an error occurred executing the method, do not pythonify the result and let the interpreter raise the error by returning NULL. * Modules/OC_PythonObject.m (-respondsTo:): Clear the error status and return NO if the Python Object does not respond to the method. * Modules/ObjC.m: Added version number to the module's doc, and show an example of the alternative syntax. Mon Sep 16 11:44:35 1996 Lele Gaifax * Include/ObjC.h (PyObjC_VERSION): Version 0.2. * Modules/objc_support.m (depythonify_c_value): Accept also Class object for _C_ID type ([Object isKindOf:] does not specify its arg must be a class...). * Modules/ObjC.m (ObjCMethod_pack_argument): New method on ObjCMethod, to support pass-by-ref parameters. (ObjCMethod_unpack_argument): idem. * Modules/ObjC.m (ObjCObject_get_class): New method on ObjCObject, named "Class", as a workaround to get the class of an object (``class'' is a reserved keyword in Python). * Modules/ObjC.m (ObjCRuntime_getattro): Clean the error set by PyDict_GetItem and by Py_FindMethod. * Modules/objc_support.m (depythonify_c_value): For pointer arguments, accept a string object too: if the sizes match, then the string object will contain whatever the method will put in it, so you'll can use struct.unpack() on it. Fri Sep 13 11:14:50 1996 Lele Gaifax * All sources: added a disclaimer, you never know... * Include/ObjC.h (PyObjC_VERSION): Initialized to 0.1. * Modules/ObjC.m (ObjCObject_call): Implemented: if X is an ObjC class, then X() is equivalent to X.new(). Does not handle arguments yet. (ObjCRuntime_Type): Implemented. (initObjC): Put an instance of ObjCRuntime in the module dictionary as the ``runtime'' member. This allow a new syntax to get an ObjC class: ObjC.runtime.TheClass. (initObjC): Added ``__version__'' to module's dictionary. * Modules/objc_support.m (pythonify_c_value): Do not convert pointers to integers, but rather dereference them and convert the value they point to. (depythonify_c_value): Correctly handle pointers: allocate some memory to keep the pointed value and depythonify there. (execute_and_pythonify_objc_method): initialize the arguments arena, where we eventually allocate memory for pointer arguments. Thu Sep 12 16:12:43 1996 Lele Gaifax * Modules/OC_PythonObject.m (-mappingDelItemString:): Work around to 1.4b3 bug: use PyDict_DelItemString if PyMapping_DelItemString is not defined in abstract.h. (-mappingDelItem:): likewise. * Modules/objc_support.m (pythonify_c_value): Convert nil to None, not NULL. nil is sometimes used by the current NS API to signal an error. But OpenStep will use exceptions, so I think this is a safe change. This cures x.superclass() bug when x is an instance of the root class. * Modules/ObjC.m (ObjCObject_methods): added .isInstance and .isClass methods. Wed Sep 11 11:50:02 1996 Lele Gaifax * Modules/objc_support.m (execute_and_pythonify_objc_method): In the error message about bad arguments, refer to the first argument as "1", not "0". Tue Sep 10 19:31:10 1996 Lele Gaifax * Modules/ObjC.m (ObjCMethod_call): Support for passing/receiving complex structures to/from the ObjC method. Sat Sep 7 12:20:18 1996 Lele Gaifax * Modules/ObjC.m: unified the decoding/encoding switches. (ObjC_load_object_files): GNU rt support implemented.