[Mono-bugs] [Bug 62533][Maj] Changed - Crashes when calling runModalForTypes(null); on NSOpenPanel

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sat, 7 Aug 2004 23:04:45 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by umuff@quark.com.

http://bugzilla.ximian.com/show_bug.cgi?id=62533

--- shadow/62533	2004-08-05 11:25:26.000000000 -0400
+++ shadow/62533.tmp.6674	2004-08-07 23:04:45.000000000 -0400
@@ -1,17 +1,17 @@
 Bug#: 62533
 Product: Cocoa#
 Version: 0.1
-OS: unknown
+OS: Mac OS X 10.3
 OS Details: 10.3.4
 Status: ASSIGNED   
 Resolution: 
 Severity: Unknown
-Priority: Wishlist
+Priority: Major
 Component: Bindings.
-AssignedTo: mono-bugs@ximian.com                            
+AssignedTo: umuff@quark.com                            
 ReportedBy: jake.macmullin@csiro.au               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
 URL: 
 Cc: 
 Summary: Crashes when calling  runModalForTypes(null); on NSOpenPanel
@@ -244,6 +244,24 @@
 0x96cb0000 - 0x96d9efff libiconv.2.dylib 	/usr/lib/libiconv.2.dylib
 0x97510000 - 0x97518fff libbsm.dylib 	/usr/lib/libbsm.dylib
 
 ------- Additional Comments From grompf@sublimeintervention.com  2004-08-05 11:25 -------
 Please attach your nib and a compilable test case.
 
+
+------- Additional Comments From umuff@quark.com  2004-08-07 23:04 -------
+This is verified.
+The problem is that the constructor is not calling 'init' so your code translates into:
+NSOpenPanel *op = [NSOpenPanel alloc];
+[op runModalForTypes: nil];
+which crashes with objective-c as well.
+However this revealed a problem with the 'init' function mapping which got translated into 
+a property (for now).
+So the workaround is:
+        NSOpenPanel op = new NSOpenPanel();
+        object _tmp = op.init;
+        op.runModalForTypes(null);
+Once we fixed this bug you will write:
+        NSOpenPanel op = new NSOpenPanel();
+        op.init();
+        op.runModalForTypes(null);
+