• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: OrderFront a window from another .nib
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.
References: 
 >OrderFront a window from another .nib (From: Nebagakid <email@hidden>)

  • Prev by Date: OrderFront a window from another .nib
  • Next by Date: Re: SearchKit: AIAT returns!
  • Previous by thread: OrderFront a window from another .nib
  • Next by thread: Re: OrderFront a window from another .nib
  • Index(es):
    • Date
    • Thread