Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Nov 24, 2007, 03:23 PM   #1
stadidas
macrumors regular
 
Join Date: Feb 2006
Location: Kent, United Kingdom
Launching a HUD Window

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!
stadidas is offline   0 Reply With Quote
Old Nov 24, 2007, 04:12 PM   #2
Darkroom
Guest
 
Join Date: Dec 2006
Location: Montréal, Canada
Quote:
Originally Posted by stadidas View Post
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...
Darkroom is offline   0 Reply With Quote
Old Nov 24, 2007, 04:17 PM   #3
stadidas
Thread Starter
macrumors regular
 
Join Date: Feb 2006
Location: Kent, United Kingdom
Excellent, the makeKeyAndOrderFront: method worked a treat, cheers.
stadidas is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
How do I play games on Bootcamp without the HUD/text being super small? Speedman100 MacBook Pro 2 May 17, 2014 08:27 PM
iPad: iPad3 volume HUD Kaiser99 Jailbreaks and iOS Hacks 0 Jan 2, 2014 04:02 PM
How do you customize/re-position the HUD buttons on Deus Ex: The Fall? MartinAppleGuy iPhone and iPod touch Apps 0 Oct 20, 2013 11:02 AM
iPhone: HUD slider Garrett67 Jailbreaks and iOS Hacks 3 Mar 2, 2013 10:25 PM
iPhone used as aircraft flight display, HUD PracticalMac iPhone 4 Jul 25, 2012 10:08 AM

Forum Jump

All times are GMT -5. The time now is 11:25 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC