Correct way of loading a secondary window of a NSDocument
Correct way of loading a secondary window of a NSDocument
- Subject: Correct way of loading a secondary window of a NSDocument
- From: Michael Lutz <email@hidden>
- Date: Sun, 31 Jul 2005 12:42:37 +0200
Hi,
I am trying to figure out the right way to load a "secondary window"
as described here in the documentation:
ADC Home > Reference Library > Documentation > Cocoa > Design
Guidelines > Document-Based Applications >
"When a secondary window of a document is closed, only that window is
closed. The window controller is removed from the document’s list of
window controllers. The secondary window and its window controller
are released."
The way I do it right now is:
TourWindowController* twc = [[TourWindowController alloc] init];
[twc setHacTour:(HacTour*)[[tourController selection]
valueForKey:@"self"]];
[twc showWindow:sender];
[[[NSDocumentController sharedDocumentController]
currentDocument] addWindowController:twc];
Where TourWindowController is the "File's Owner" in the associated
NIB. But as it seems there is no connection between the document and
the window (or TourWindowController). So I guess that's the wrong way
to do it. Any pointers to documentation, help on how to load/create a
"secondary window" (in the sense described above) is greatly
appreciated :).
Thank you,
Michael _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden