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

stadidas

macrumors regular
Original poster
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!
 
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.