• 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
Multiple windows B from window A
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Multiple windows B from window A


  • Subject: Multiple windows B from window A
  • From: cogilog <email@hidden>
  • Date: Tue, 13 Aug 2002 22:15:31 +0200

A question from a beginner.
A "New" button in a window A is designed to open a window B.
Each hit on this button should open a new window B (as does the command New
on a NSDocument based application). The template of window B is designed in
IB and is stored in the MainMenu.nib among other window templates.
I got a outlet of this template as aWindowB

I tried this action (connected to the "New" button in window A) :
-(IBAction) openWindowB:(id)sender
{
NSWindowController * aNSWindowController;
aNSWindowController=[[NSWindowController alloc] initWithWindow:aWindowB]
[aNSWindowController showWindow:aWindowB];
}

the first hit on the button opens a window B as expected but the following
hits always open the same window B (not a new one).

if I create programmatically new instances of window B before creating
theNSWindowController, this works (I got different windows B) but in this
case I am not able to use the template I have in my nib file for the window
B. I am beginner, I should have missed some thing.
Thank for your help.

Jean
_______________________________________________
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: Sleep/power save events
  • Next by Date: Dragging destination
  • Previous by thread: Sleep/power save events
  • Next by thread: Dragging destination
  • Index(es):
    • Date
    • Thread