[Mono-bugs] [Bug 576262] New: An app delegate in a dll doesn't behave the same as an app delegate in the same file as the application class
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Tue Feb 2 15:31:14 EST 2010
http://bugzilla.novell.com/show_bug.cgi?id=576262
http://bugzilla.novell.com/show_bug.cgi?id=576262#c0
Summary: An app delegate in a dll doesn't behave the same as an
app delegate in the same file as the application class
Classification: Mono
Product: MonoTouch
Version: unspecified
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Runtime
AssignedTo: gnorton at novell.com
ReportedBy: banshee at restphone.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
Created an attachment (id=340299)
--> (http://bugzilla.novell.com/attachment.cgi?id=340299)
the external .cs file with the app delegate - it's trivial, you could use your
own
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-US)
AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.0.249.49 Safari/532.5
I'd like to use F# with monotouch, so my first step was to see if I could use
an app delegate that's defined (in C#) in a dll. If I call it like this:
public class Application
{
static void Main (string[] args)
{
Console.WriteLine("starting main");
//var f = new ExternalAppDelegate();
UIApplication.Main (args, null, "xpd");
}
}
I get this error:
Unhandled Exception: MonoTouch.Foundation.MonoTouchException: Objective-C
exception thrown. Name: NSInternalInconsistencyException Reason: Unable to
instantiate the UIApplication delegate instance. No class named xpd is loaded.
at (wrapper managed-to-native)
MonoTouch.UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String
principalClassName, System.String delegateClassName) [0x00000] in <filename
unknown>:0
at TouchMeMd.Application.Main (System.String[] args) [0x0000a] in
/Users/jamesmoore/dev/mono/TouchMeMd/TouchMeMd/Main.cs:16
If I uncomment the line that creates a (unused) instance of the app delegate
class, it does better (it doesn't crash), but that seems strange.
Reproducible: Always
Steps to Reproduce:
1.
2.
3.
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list