Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

KieferThomas

macrumors newbie
Original poster
Mar 27, 2012
18
0
Hello All,

I have been working with Xcode for a few weeks now and am finding it fun to work with.

I have a problem which I have not figured out how to resolve. I have been searching the net and not coming up with any answers to this specifi problem...

I have created a small project which I have created and I am calling a new window from within the same nib. This works fine once and only once when I call the new window from my menu. After I close the window and wish to re-open it the program crashes at the program initialization line in the main.m file with the error of: Thread 1: EXC_BAD_ACCESS(code=13, address=0x0).

#import <Cocoa/Cocoa.h>

int main(int argc, char *argv[])
{
return NSApplicationMain(argc, (const char **)argv); <--- Error thrown after window closed...:eek:
}

The above in the debug window of Xcode is showing argc = int(3) and arv = char '/'

Can anyone give me some pointers how to straighten this out so I can call the new window from within the same nib? And not have this error...

Thanks inadvance,

Kiefer
 
Last edited:
Add New WindowController

After adding a new object controller and changing it to a NSWindowController and making the proper links the program is working proplerly...
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.