Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > NSUIElement / NSBGOnly

NSUIElement / NSBGOnly
Thread Tools
Mac Elite
Join Date: Sep 2000
Location: Eagan, MN
Status: Offline
Reply With Quote
Apr 18, 2001, 05:01 PM
 
I know how to use NSUIElement or NSBGOnly to kill your apps dock icon, but your menu also dies. So, how do you get your menu to work under either?

(Just as an example: PTHClock uses NSUIElement.)

------------------
     
Admin Emeritus
Join Date: Oct 2000
Location: Boston, MA
Status: Offline
Reply With Quote
Apr 18, 2001, 05:26 PM
 
That's a good question. I remember I used NSUIElement back in the Public Beta, and my menu didn't die, but it seems that it does now.

Was PTHClock recompiled?
"Against stupidity, the gods themselves contend in vain" (Schiller)
     
Mac Elite
Join Date: Sep 2000
Location: Eagan, MN
Status: Offline
Reply With Quote
Apr 18, 2001, 06:09 PM
 
Originally posted by parallax:
Was PTHClock recompiled?
That's an incredibly good point. But, I checked and the latest is a GM release on 3/24.

Another note. Even thought the menu doesn't appear, the menu is still attached to the application ([[NSApp keyWindow] setTitle:NSStringFromClass([[NSApp mainMenu] class])] produces "NSMenu") and keyboard shortcuts in the menu still work. Odd.

------------------
     
Senior User
Join Date: Nov 2000
Status: Offline
Reply With Quote
Apr 18, 2001, 09:22 PM
 
I feel stupid for having to ask but...

How do you kill your apps dock icon?
     
Admin Emeritus
Join Date: Oct 2000
Location: Boston, MA
Status: Offline
Reply With Quote
Apr 18, 2001, 09:46 PM
 
Open up your project, click on targets, Application Settings, hit Expert. Add a sibling called "NSUIElement" (or "NSBGOnly." To our knowledge, it's just a matter of preference) with a string value of "1".
"Against stupidity, the gods themselves contend in vain" (Schiller)
     
Senior User
Join Date: Nov 2000
Status: Offline
Reply With Quote
Apr 18, 2001, 10:08 PM
 
thanks much!
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 01:21 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2