Re: Re: Spawning windows.
Re: Re: Spawning windows.
- Subject: Re: Re: Spawning windows.
- From: "Shawn Erickson" <email@hidden>
- Date: Fri, 10 Nov 2006 11:56:33 -0800
On 11/10/06, George C <email@hidden> wrote:
> Is there some sort of indentification associated with each window
> > object?
>
> No, but you could connect it to an outlet.
>
>
If I connect it to an outlet, do I need to allocate an instance of it?
No. IBOutlets connect to objects in the nibs, objects in nibs exist already.
What would I do to make the window be displayed?
Review the NSWindow documentation and related conceptual
documentation. Look for -[NSWindow orderFront:], -[NSWindow
makeKeyAndOrderFront:].
<file:///Developer/ADC Reference Library/documentation/Cocoa/Reference/ApplicationKit/Classes/NSWindow_Class/index.html>
<file:///Developer/ADC Reference Library/documentation/Cocoa/Conceptual/WinPanel/index.html>
What would the Cocoa code look like to do this?
@interface MyController : NSObject {
IBOutlet NSWindow* window;
}
- (void)showWindow;
@end
@implementation
- (void)showWindow
{
[window makeKeyAndOrderFront:self];
}
@end
-Shawn
_______________________________________________
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