Re: OrderFront a window from another .nib
Re: OrderFront a window from another .nib
- Subject: Re: OrderFront a window from another .nib
- From: Nick Zitzmann <email@hidden>
- Date: Mon, 21 Apr 2003 13:22:09 -0700
On Monday, April 21, 2003, at 12:48 PM, Nebagakid wrote:
So, I want to orderFront a window from another .nib that is in the
same program but not connected to the same Controller (except by some
#import 's ) How do I do this? (I know this probably reads very
confusingly, but I am at a loss for the correct terms!)
Here's one way of doing this:
@interface objectOne : NSObject
{
IBOutlet NSWindow *someWindow;
}
- (NSWindow *)window;
@end
@implementation objectOne
- (NSWindow *)window
{
return someWindow;
}
@end
Then call [[someInstanceOfObjectOne window] orderFront:self] from some
other object. If "objectOne" is instantiated once and there's only one
instance of it, then you could create a singleton accessor method...
Nick Zitzmann
AIM/iChat: dragonsdontsleep
Check out my software page:
http://dreamless.home.attbi.com/
"Building the future and keeping the past alive are one and the same
thing." - Metal Gear Solid 2
_______________________________________________
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.