Hello!
It will be a noob question, but i'm getting crazy with this. I've read a tons of topics but i think i am missing something main.
I`ve created new cocoa app project, did not change anything, just add next code to main.m
int main(int argc, char *argv[])
{
NSView *superview = [window contentView];
NSRect frame = NSMakeRect(10, 10, 200, 100);
NSButton *button = [[NSButton alloc] initWithFrame:frame];
[button setTitle:@"Click me!"];
[superview addSubview:button];
[button release];
return NSApplicationMain(argc, (const char **) argv);
}
During compiling xcode tells me that window undeclared. I understand that instead of window should be name of my NSWindow object, but i don`t understand which name has NSWindow which automatically created in MainMenu.xib file.
Please help, i`m almost ready to broke the wall with my head.