• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Programmatic NSWindows
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Changing Fonts in NSTexView
  • Next by Date: NSTextStorage refreshing NSTextView
  • Previous by thread: Re: Changing Fonts in NSTexView
  • Next by thread: Re: Programmatic NSWindows
  • Index(es):
    • Date
    • Thread