Re: New Document Behavior
Re: New Document Behavior
- Subject: Re: New Document Behavior
- From: Jacob Lukas <email@hidden>
- Date: Mon, 11 Oct 2004 19:15:24 -0700
Try subclassing your document's window controller (I'm not quite sure how to do this) and implementing
<x-tad-bigger>windowDidBecomeMain:</x-tad-bigger> or
<x-tad-bigger>windowDidBecomeKey:</x-tad-bigger>. Then orderFront: your panel. You'll need to pass your window controller a flag to tell it if it's a new document. Remember to change the flag when you move the panel to the front otherwise it'll bring it to the front every time you click on your document.
Jacob
On Oct 11, 2004, at 6:38 PM, James Spencer wrote:
OK, I must be blind or dumb but I just can't figure this out even though I suspect it should be simple. My application is a standard document based application with a single main window for each document. There is a also a non-modal utility window in which the user sets some values which aren't usually displayed in the main window, the utility window being controlled through its own window controller. The utility window controller is created by the main window controller in response to appropriate actions (button clicks and/or menu choices) and it loads its own NIB containing the utility window itself. All of this works just fine.
What I'm having a problem with is that I would like to bring the utility window up in front of the main window when I create a new document (to remind the user that the utility values should be changed from the defaults) but I've not been able to find a hook where I can do this. If I do it in the main window's awakeFromNib, the main window ends up in front and I've just not found any other method, in say my document or window classes or in the window's delegate. I've considered subclassing the document controller to override -newDocument: but this doesn't seem right.
Am I overlooking something obvious or is this just too bizarre a thing to want to do? I would have thought that there would be some method that would get called after a window was actually displayed so that I could then create my utility window and bring it to the front.
Spence
James P. Spencer
Rochester, MN
email@hidden
"Badges?? We don't need no stinkin badges!"
_______________________________________________
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
_______________________________________________
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