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 > Applications w/out menubar/dock?

Applications w/out menubar/dock?
Thread Tools
wkw
Fresh-Faced Recruit
Join Date: Apr 2001
Location: Ridgefield, CT
Status: Offline
Reply With Quote
Apr 10, 2001, 02:57 PM
 
Can anyone suggest how one puts together an App along the lines of the AppleScript script runner? Namely, no menubar, nothing showing up in the dock for it, but still able to put up some GUI elements like utility windows.

thanks,

-wayne
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Apr 10, 2001, 04:58 PM
 
I think it's probably a case of setting BackGroundOnly = YES in some .plist somewhere, or something similar. Sorry I couldn't be more specific. You might like to poke in the application you speak of's plists.
     
Admin Emeritus
Join Date: Oct 2000
Location: Boston, MA
Status: Offline
Reply With Quote
Apr 10, 2001, 05:06 PM
 
It's done using a setting called "NSUIElement"

Click on your targets tab, then "Application settings." Then create a new key called "NSUIElement" (without quotes) with a string value of "1" (again, without quotes). The application will run without a dock icon and in the background.
"Against stupidity, the gods themselves contend in vain" (Schiller)
     
Fresh-Faced Recruit
Join Date: Sep 2000
Location: Sunnyvale, CA, USA
Status: Offline
Reply With Quote
Apr 10, 2001, 07:27 PM
 
I am not sure that parallax is correct in the flag he stated that you should use. I am not saying that the I know definitely that the "NSUIElement" flag is incorrect only that in all other posts relating to this matter that I have seen, the flag has always been "NSBgOnly". You can try both flags to determine if they both work or if "NSUIElement" has replaced "NSBgOnly" which was used in Mac OS X Public Beta.

To set this flag in ProjectBuilder that was released with Mac OS X, click the Targets tab, then "Application settings". Click on the Expert button, and then create a new key called "NSBgOnly" (without the quotes) or "NSUIElement" (without the quotes) by clicking on the "New Sibling" button. Give the created flag a string value of "1" (without the quotes). Hopefully, one of these flags will work for you and the application will run without a dock icon and in the background.
     
wkw  (op)
Fresh-Faced Recruit
Join Date: Apr 2001
Location: Ridgefield, CT
Status: Offline
Reply With Quote
Apr 10, 2001, 07:28 PM
 
The tip on backgroundOnly sounds promising. I came across that in the example Service project (SimpleService). The property is "NSBGOnly=1".

re: "NSUIElement": I'll see what info I can dig up on that. Thanks to both of you.

-wayne
     
wkw  (op)
Fresh-Faced Recruit
Join Date: Apr 2001
Location: Ridgefield, CT
Status: Offline
Reply With Quote
Apr 10, 2001, 07:47 PM
 
I just took a look at the info.plist file for Script Runner. It has the "NSUIElement=1" but no NSBgOnly property. Parallax must be on the right track. Wish I could find documentation for either. So far, nothing in Help Viewer or on Apple's dev site...
-wayne
     
Admin Emeritus
Join Date: Oct 2000
Location: Boston, MA
Status: Offline
Reply With Quote
Apr 10, 2001, 07:50 PM
 
Whoa, that's odd. I've never heard of NSBGOnly (it might be the replacement for NSUIElement, which has been there for a while) They both seem to have the same effect (?). Time to investigate some more. Dock.app itself uses NSUIElement (Set it to 0 to put the Dock in the Dock :-). So does PTHClock.

Anyone?
"Against stupidity, the gods themselves contend in vain" (Schiller)
     
Fresh-Faced Recruit
Join Date: Sep 2000
Location: Sunnyvale, CA, USA
Status: Offline
Reply With Quote
Apr 10, 2001, 08:26 PM
 
Until I read parallax's post I hadn't heard of "NSUIElement". The "NSBGOnly" was suggested on Carbon-Dev list that Apple maintains. I am currently using "NSBGOnly" flag in my background app.

It may not make any difference which flag you use. I can submit a question on Carb-Dev list to see which one of these flags is preferred by Apple (assuming they have a preference). Also, the "NSBGOnly" appears to be specific type flag while the "NSUIElement" is more vague type flag. The "NSUIElement" flag might have other ramifications besides keeping the app from appearing in the dock.

[This message has been edited by thunter (edited 04-10-2001).]
     
Fresh-Faced Recruit
Join Date: Sep 2000
Location: Sunnyvale, CA, USA
Status: Offline
Reply With Quote
Apr 10, 2001, 08:41 PM
 
I have posted this flag question to Carbon-Dev list. I will post the response if I get one from Apple.
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Apr 11, 2001, 01:18 PM
 
NSUIElement sounds like an Apple tag for internal use... There was something like "layers" in PrivateInterfaceLib or whatever (the hidden Apple framework that contains some funky little functions like stopping and starting processes under OS 9) which could let you set windows to be at desktop level and things, perhaps it's something like that? Only guessing
     
Fresh-Faced Recruit
Join Date: Sep 2000
Location: Sunnyvale, CA, USA
Status: Offline
Reply With Quote
Apr 11, 2001, 03:29 PM
 
Here is the response from Apple:

"They're not quite the same. I don't know all the differences myself. I
think NSBGOnly is the only one we recommend for use by applications at
this time".

     
Admin Emeritus
Join Date: Oct 2000
Location: Boston, MA
Status: Offline
Reply With Quote
Apr 11, 2001, 04:07 PM
 
Ah, thanks.

Well, I'm still using NSUIElement until Apple comes up with a good reason not to :-).
"Against stupidity, the gods themselves contend in vain" (Schiller)
     
   
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 03:01 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