Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Question on Window orderOut (/ handling windows)

Question on Window orderOut (/ handling windows)
Thread Tools
Fresh-Faced Recruit
Join Date: Feb 2001
Location: Amstelveen, Netherlands
Status: Offline
Reply With Quote
Mar 1, 2001, 09:51 AM
 
Basically my question is:
How can you address a specific window with the orderOut, makeKeyAndOrderFront in Cocoa?

The detailed situation is as follows:
I have a panel named "panel" on the left side, a "mainWindow1" in the center. And depending on the userīs input I want to create 1 to 4 "userpanels#" with a tiff or jpeg image in each of them under the mainWindow1.
Now my problem is. When a user presses a button in the "mainWindow1" this mainWindow1 should be ordered out and another window: "mainWindow2" should appear in itīs place. Also at the same time the "userpanels#" should disappear from screen and one of the four panels returns left of the middle (preferably in a slightly larger size).
From the panel it should be possible to restore the old situation again (but if I know it for the first method then this will be just the same).

I already created an outlet: -IBOutlet and hooked it up to the 1 windowcontroller I have. However I am unable to define the right action.
I have no clue on how to address a specific window to disappear or another to makeKeyAndOrderFront.

I read about windowNumber, but that only gives the window number of the window list. I still then donīt know if I have the right window.

But how can you address these particular windows?
Or do I need to create a windowController class for each window and connect the controller to that window only?

What does the -(void)setWindowController actually do? there is no subscription yet. :-(

Please give the function arguments required and in which (windowController) files they should be.
Thanks heaps.
     
Mac Enthusiast
Join Date: Feb 2000
Location: Storrs,Connecticut, USA
Status: Offline
Reply With Quote
Mar 2, 2001, 05:28 AM
 
You have outlets to the window so you can just do something like:

[outletName makeKeyAndOrderFront:nil];

and your window will appear and be key. Same thing for orderOut.
     
evdmeer  (op)
Fresh-Faced Recruit
Join Date: Feb 2001
Location: Amstelveen, Netherlands
Status: Offline
Reply With Quote
Mar 3, 2001, 02:52 PM
 
Thanks, I got it to work.
I have a follow up question.

How exactly do I have to type the function call or message
to be able to have an implementation file A first call a window
controller B, so that this window controller B is the one who
orders the window to the back and front?
     
Mac Enthusiast
Join Date: Feb 2000
Location: Storrs,Connecticut, USA
Status: Offline
Reply With Quote
Mar 3, 2001, 05:15 PM
 
You just do something like:

[windowController showWindow:nil];

in order to show it. If you want to make it disappear fron the screen without closing it then I guess that you'll have to call:

[[windowController window] orderOut:nil];

But if you want to close it you can use the close method in NSWindowController.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:29 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2