Commits

Bill Bumgarner  committed 23e1987

[Maybe] Fixed problems with invocation of NSProxy's -forwardInvocation: method.

  • Participants
  • Parent commits bf72361

Comments (0)

Files changed (3)

File pyobjc/Examples/HelloWorld.py

 import pyobjc
 rt = pyobjc.runtime	# shorthand -- runtime gets used a lot!
 
+class AppDelegate:
+    def applicationDidFinishLaunching_(self, aNotification):
+        print "Hello, World!"
+
 def main():
 
     pool = rt.NSAutoreleasePool()
 
     # Load Application Framework:
-    rt.NSBundle.bundleWithPath_( 
-	'/System/Library/Frameworks/AppKit.framework').load()
+    rt.NSBundle.bundleWithPath_('/System/Library/Frameworks/AppKit.framework').load()
 
-    NSApp = rt.NSApplication.sharedApplication()
+    ##! NSApp.setDelegate_( AppDelegate() )
 
     win = rt.NSWindow.alloc()
     frame = ((200.0, 300.0), (250.0, 100.0))
 
 WHAT'S NEW:
 
-Version 2001-03-17 (March 17, 2001:
+Version 2001-03-17 (March 17, 2001):
 
 - moved to using distutils setup.py (requires small patch to distutils
   that has been submitted against python 2.1b1)

File pyobjc/OC_PythonObject.m

 	      NS_HANDLER
 		Py_DECREF(args);
 	        fprintf (stderr, "error getting type of arg %d\n", i);
-		[super forwardInvocation:invocation];
+		//! [super forwardInvocation:invocation];
 		return;
 	      NS_ENDHANDLER
 		
 	      else
 		[invocation setReturnValue:retbuffer];
 	    }
+	  return;
         }
     }
 
-  [super forwardInvocation:invocation];    
+  //! [super forwardInvocation:invocation];    
 }