Re: programmatically inserted dock items not showing up
Re: programmatically inserted dock items not showing up
- Subject: Re: programmatically inserted dock items not showing up
- From: Chase <email@hidden>
- Date: Mon, 18 Jul 2005 21:40:31 -0500
holy cow. i can't believe i just wasted this much time on something
that i can't even use.
Finlay Dobbie replied to my question "are there any convenient api's
for programmatically placing an item in the dock?" a couple days ago
with this link:
http://developer.apple.com/samplecode/CFPrefDockItems/
CFPrefDockItems.html
I based my code on this, but changed it all over to cocoa.
What I didn't do was just run it as-is and see what it did. ... not
too bright.
I just now, after reading your post, ran the project as-is, and viola
-- same thing. the app gets added, but can't be seen until reboot or
re-login.
I've seen apps do this though.
It's obviously doable in some way.
I wonder how they're doing it?
- Chase
On Jul 18, 2005, at 9:15 PM, Chris Parker wrote:
On Jul 18, 2005, at 6:52 PM, Chase wrote:
I'm using NSUserDefaults to add a dock item (on the app side)
programmatically.
It works beautifully, except I have to log out and back in again
to see it in the Dock.
How can I get Dock.app to realize there's a new item to display on-
the-fly?
I thought that's what synchronize was for.
I tried the Cocoa and CoreFoundation varieties. Neither results
in the icon showing up.
Any ideas?
-[NSUserDefaults synchronize] and CFPreferences{App}Synchronize()
don't force everyone else to sync up with the changes - they cause
your process to sync up with any changes that may have been made
behind its back.
There is at present no way to add an icon to the Dock and have it
appear without killing the Dock and letting it autorestart.
Please don't do this - there is an enhancement request for specific
API to have this work.
.chris
--
Chris Parker
Cocoa Frameworks
Apple Computer, Inc.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden