Programmatic NSWindows
Programmatic NSWindows
- Subject: Programmatic NSWindows
- From: Robert Lee Dotson <email@hidden>
- Date: Wed, 10 Jul 2002 15:36:15 -0400
I know I've asked this before, but I can't find my question or the answers
on the list archive. Here we go again. How do I programmatically create
NSWindows? Looking at header files and docs I come up with the following
code:
NSWindow *myWindow;
NSWindowController *windowController;
myWindow = [[NSWindow alloc] initWithContentRect:[NSScreen visibleFrame]
styleMask:NSClosableWindowMask
backing:NSBackingStoreNonretained
defer:YES];
windowController = [[NSWindowController alloc] initWithWindow:myWindow];
[windowController showWindow:nil];
Which doesn't work. On compiling, I get an 'incompatible type for argument 3
of indirect function call' error. When I could get it to compile (how, I
can't remember) I got a 'couldn't create context object cntx for window -1'
or something like that in stderr.
Li'l help?
R
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.