Loading NIB files and Objective C++ files

34 views
Skip to first unread message

Ed M

unread,
Aug 16, 2009, 3:07:36 PM8/16/09
to ObjectivEClipse Development Group

I'm trying to build a simple Cocoa app and a couple issues have
arisen:

- Has anyone loaded a .nib file successfully and if so where did you
put the SomeApp.app directory and SomeApp.nib file? I'm doing this in
XCode to load it which has the SomeApp.app directory and SomeApp.nib
file in build/Debug/

[NSApplication sharedApplication];

BOOL success = [NSBundle loadNibNamed:@"SomeApp" owner:NSApp];

if(success == YES) {
[NSApp run];
}

I've tried putting the SomeApp.app directory and SomeApp.nib in /
Applications and in the Eclipse workspace in Debug/.

- ObjectivEClipse doesn't seem to handle Objective C++ files with
the .mm extension. They go to XCode if you try to open them. Is this
an oversight or on purpose since maybe the parser doesn't handle
Objective C++ yet?

Alex Blewitt

unread,
Aug 16, 2009, 5:11:29 PM8/16/09
to objective...@googlegroups.com
On Sun, Aug 16, 2009 at 8:07 PM, Ed M<ed.mi...@gmail.com> wrote:
>
> I'm trying to build a simple Cocoa app and a couple issues have
> arisen:
>
> - Has anyone loaded a .nib file successfully and if so where did you
> put the SomeApp.app directory and SomeApp.nib file?  I'm doing this in
> XCode to load it which has the SomeApp.app directory and SomeApp.nib
> file in build/Debug/

I managed to get MainMenu.nib to load using this code when created as
the standard Cocoa template in XCode. I had to put it under Debug
though. I suspect that using an .xib doesn't work with this call.

Note that at the moment the build doesn't generate an .app structure
(with Contents/Resources etc.) - the CDT currently just compiles the
executable under the Debug/ tree. We should look to make that easier
at some point in the future though...

> - ObjectivEClipse doesn't seem to handle Objective C++ files with
> the .mm extension.  They go to XCode if you try to open them.  Is this
> an oversight or on purpose since maybe the parser doesn't handle
> Objective C++ yet?

The problem is that the C parser and C++ parser are two entirely
different beasts in CDT. In order to build upon a standard C set, the
parser doesn't extend the C++ parser at the moment. As a result, it
doesn't try to open .mm files. I'm not sure what the best way to solve
this in the future - we might have to have an abstract parser and then
subclassed delegates which then handles both parts. However, for the
short term, the plan is to focus on the C subset of Objective C
support.

Alex

Steven Mak

unread,
Aug 22, 2009, 12:47:26 PM8/22/09
to ObjectivEClipse Development Group
+1 to focus on the C subset of the Obj C support

On Aug 17, 5:11 am, Alex Blewitt <alex.blew...@gmail.com> wrote:

Ryan Rusaw

unread,
Aug 28, 2009, 12:59:05 AM8/28/09
to ObjectivEClipse Development Group
+1 for C subset support first.

Mainly because I've been swamped at work lately and haven't had much
time to work on even the C subset much.
Reply all
Reply to author
Forward
0 new messages