On Mar 1, 2009, at 09:51, Mic Pringle wrote:
1/ Is it possible to determine if your application is in the users dock ? I know I can use the dock tile class if the application is open and therefore know the application is in the dock, but what I'd like to know is if it's possible to determine if an application is in the dock without it being open, as in the user has right clicked and added it to their dock, or dragged it in from their applications folder. The reason I'd like to know is because if the user doesn't have the gui open, I'd like to daemon to alter the dock icon to highlight to the user that they should open the gui as some changes have occurred since last time they opened it.
It *might* be possible to find out via AppleScript, but I doubt that knowing is going to help you. The only application I know of whose dock icon can change when it's not running is iCal, and when that feature arrived (with Leopard, IIRC) it was implemented in a private framework. IOW, non-Apple apps can't do it.
You're probably better off just having your daemon keep your application alive all the time, and let the application badge its own dock icon when new information is available, like Mail does.
2/ The daemon part is scheduled to check a web based service several times a day and downloads certain pieces of information when they have been updated. I'm currently using an NSTimer to do this, is this the best and most efficient way of achieving this type if process ? Can anyone suggest any other ways of doing it ?
Seems like a perfectly fine way of doing it. _______________________________________________ Cocoa-dev mailing list ([email protected]) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
