Hello,

Monobjc is very strict when it comes to NIB loading, so I suspect a
path problem at the startup.

As the only major difference is the packaging, can you try to use the
NAnt tasks to do the packaging ?

You can use the NAnt script use in the sample app as a starting point.
You MUST run the nant command under MacOS X, as during the packaging,
a chmod command is launched to give the startup script the executable
flags.

Regards, Laurent Etiemble.

2008/11/15 marc hoffman <[EMAIL PROTECTED]>:
> Laurent,
>
> There are a lot of mistakes that can produce this error. Anyway, could
> you check the following points (even if some of them seem trivial):
> - Check the code in your main method looks like the one described at
> http://www.monobjc.net/index.php?page=bootstrapping .
>
> the startup code is copied directly from the SimpleCocoa app, only the name
> of the NIB is changed to match what mine is called:
> class method Program.Main;
> begin
>   ObjectiveCRuntime.LoadFramework("Cocoa");
>   ObjectiveCRuntime.Initialize();
>   NSApplication.Bootstrap();
>   NSApplication.LoadNib("Interface.nib");
>   NSApplication.RunApplication();
> end;
> (yes, i use Oxygene/Delphi Prism, not C#, but im 110% certain that that's
> not the problem ;)
>
> - Check the structure of your bundle is correct (see
> http://www.monobjc.net/index.php?page=anatomy-of-an-application). It
> is important to use the correct structure, otherwise the resources are
> not found.
>
> i didn't have the NIB in a en.lproj folder, but beyond that all looks the
> same. i did try moving the NIB to the subfolder, no difference.
>
> - How do you launch your application ? From the Finder or from the
> command line ? If from the command line, do you use the startup script
> <YourApp>.app/Contents/MacOS/<YourApp> ?
>
> i use MacPack (or the equivalent of it, which we have integrated into Visual
> Studio as part of Prism) to package it up as .app. i then simply
> double-click the app in Finder to start. literally the exact sam setup works
> for Cocoa#.
>
> You can also check your application against one of the sample
> application (like SimpleCocoaApp), to see if you can spot a difference
> or use it as a starting point. Let me know if you find something.
>
> that's the thing - that's where i did start from, and afaict looks
> identical.
> any further ideas?
> marc

Reply via email to