Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

stadidas

macrumors regular
Original poster
Feb 27, 2006
243
0
Kent, United Kingdom
I'm sure this is probably very simple, but I've been looking around for a way to load a window from a NIB file and can't find anywhere that tells me what I need.
Basically, I have a HUD window (NSPanel) in my MyDoucment.nib that I want to load when a button is pressed on the main window. I have attached an action to this button, I just need the code that will load a window from the NIB file. I know how to do it as a sheet, I just can't seem to figure out to launch a separate window.

Thanks for any help!
 

Darkroom

Guest
Dec 15, 2006
2,445
0
Montréal, Canada
I'm sure this is probably very simple, but I've been looking around for a way to load a window from a NIB file and can't find anywhere that tells me what I need.
Basically, I have a HUD window (NSPanel) in my MyDoucment.nib that I want to load when a button is pressed on the main window. I have attached an action to this button, I just need the code that will load a window from the NIB file. I know how to do it as a sheet, I just can't seem to figure out to launch a separate window.

Thanks for any help!

you're button action should be like this:

Code:
-(IBAction)actionName:(id)sender {
 NSPanel* panelName;
 [panelName makeKeyAndOrderFront:nil];
}

... i think... i'm fairly new too but that's how i'd write it...
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.