[PyObjC-svn] r2224 - in trunk/pyobjc/pyobjc-core: . Modules/objc

[email protected] Tue, 19 May 2009 07:34:48 -0500
Newsgroups gmane.comp.python.pyobjc.cvs
Message-ID <[email protected]>
Author: ronaldoussoren
Date: Tue May 19 07:34:48 2009
New Revision: 2224

Log:
Fix for crash when using CoreAnimation animation proxies. That is, without
this patch the following code crashes::

	app = NSApplication.sharedApplication()
	window = NSWindow.alloc().init()
	anim = window.animator()
	anim.setAlphaValue_(1.0)



Modified:
   trunk/pyobjc/pyobjc-core/Modules/objc/objc-object.m
   trunk/pyobjc/pyobjc-core/NEWS.txt

Modified: trunk/pyobjc/pyobjc-core/Modules/objc/objc-object.m
==============================================================================
--- trunk/pyobjc/pyobjc-core/Modules/objc/objc-object.m	(original)
+++ trunk/pyobjc/pyobjc-core/Modules/objc/objc-object.m	Tue May 19 07:34:48 2009
@@ -798,7 +798,7 @@
 PyObject* 
 PyObjCObject_New(id objc_object, int flags, int retain)
 {
-	Class cls = [objc_object class];
+	Class cls = object_getClass(objc_object);
 	PyTypeObject* cls_type;
 	PyObject*     res;
 

Modified: trunk/pyobjc/pyobjc-core/NEWS.txt
==============================================================================
--- trunk/pyobjc/pyobjc-core/NEWS.txt	(original)
+++ trunk/pyobjc/pyobjc-core/NEWS.txt	Tue May 19 07:34:48 2009
@@ -7,6 +7,15 @@
 Version 2.2 (...)
 -----------------
 
+- Fix crash when using the animotor proxy feature of CoreAnimation. That is,
+  the following code now works::
+
+	app = NSApplication.sharedApplication()
+	window = NSWindow.alloc().init()
+	anim = window.animator()
+	anim.setAlphaValue_(1.0)
+
+
 - Improve handling of non-methods in objc.Category:
 
   * The docstring of a category is now ignored

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects