Re: I need a milder application badge (solution #2)

2009-07-26 Thread Jay Reynolds Freeman
Well, with great thanks to everybody, I think I now have a relatively clean implementation that does what I want. There was enough interest that I think I will present what I have done, but in order not to waste bandwidth here I have put on my website both the interface and implementation

Re: I need a milder application badge (solution)

2009-07-25 Thread Rob Keniger
On 26/07/2009, at 11:16 AM, Stuart Malin wrote: Of course, you can have your custom view draw whatever you'd like (in a 128 x 128 frame). If the appearance of the view needs to change due to underlying changes in teh state of your app, just issue the -display message to the dockTile:

Re: I need a milder application badge (solution)

2009-07-25 Thread Stuart Malin
Jay: I hope I am on the mark here with what you are trying to achieve I have just constructed a rather tiny app that displays a custom image in the Dock. This custom view is shown in the dock for the app itself when running (not just when minimized). The app icon is *not* shown becau

Re: I need a milder application badge (solution)

2009-07-25 Thread Kyle Sluder
On Sat, Jul 25, 2009 at 4:04 PM, Jay Reynolds Freeman wrote: > Kyle, I read you loud and clear, or at least I think I do, but the behavior > you describe for the app icon image in the dock is not what I am seeing.  I > am running my application now, with my bitmap-hacking code in place, > and it ha

Re: I need a milder application badge (solution)

2009-07-25 Thread Greg Guerin
Jay Reynolds Freeman wrote: Precisely! And what I am wishing for is a way to specify a window whose "existing color" is "transparent", so that the bitmap created will in essence have (red, green, blue, alpha) = (0, 0, 0, 0), in locations not otherwise explicitly drawn. If such a window appeare

Re: I need a milder application badge (solution)

2009-07-25 Thread Adam R. Maxwell
On Jul 25, 2009, at 4:04 PM, Jay Reynolds Freeman wrote: On Jul 25, 2009, at 3:14 PM, Kyle Sluder provided a variety of extremely helpful and pertinent comments: > I'm also pretty sure you don't want to use - setApplicationIconImage:. > That will cause all occasions of your app icon, includin

Re: I need a milder application badge (solution)

2009-07-25 Thread Jay Reynolds Freeman
On Jul 25, 2009, at 3:14 PM, Kyle Sluder provided a variety of extremely helpful and pertinent comments: > I'm also pretty sure you don't want to use -setApplicationIconImage:. > That will cause all occasions of your app icon, including places that > use +[NSImage imageNamed:] with an @"NSApplica

Re: I need a milder application badge (solution)

2009-07-25 Thread Kyle Sluder
On Sat, Jul 25, 2009 at 12:15 PM, Jay Reynolds Freeman wrote: > I do not want to change the dockTile, and no public method of > NSDockTile appears to change the dock icon in any case.  I am > indeed using -[NSApplication setApplicationIconImage:], my > problem is creating a new image that has the c

Re: I need a milder application badge (solution)

2009-07-25 Thread Jay Reynolds Freeman
> You have two choices: change your application's icon using > -[NSApplication setApplicationIconImage:], or customize the dock > tile returned by -[NSApplication dockTile]. Neither of these > changes will persist after your application quits. I do not want to change the dockTile, and no public m

Re: I need a milder application badge (solution)

2009-07-25 Thread Scott Ribe
> If I set a particular background color for the view where I am drawing > the image... Sherm's suggestion does not involve drawing into a view at all... -- Scott Ribe scott_r...@killerbytes.com http://www.killerbytes.com/ (303) 722-0567 voice ___ C

Fwd: I need a milder application badge (solution)

2009-07-25 Thread Jay Reynolds Freeman
What Sherm suggests is exactly what I described as my solution, and it does work, with one serious problem: Capturing the image that gets drawn in the manner described *also* captures whatever background lies beyond the transparent portions of the image, and that is not what I want. That is why

Re: I need a milder application badge (solution)

2009-07-25 Thread Sherm Pendley
On Sat, Jul 25, 2009 at 1:54 PM, Jay Reynolds Freeman wrote: > What I want to do is modify the dock icon while the application running. >  The only interface I can find to do this is > NSApp.setApplicationIconImage: , which requires an NSImage.  I have no way > to get at the actual view being used

Re: I need a milder application badge (solution)

2009-07-25 Thread Kyle Sluder
On Jul 25, 2009, at 10:54 AM, Jay Reynolds Freeman > wrote: The doc tile is the tiny image of the application main window that appears in the dock when you minimize the application. The dock icon is (usually) the regular application icon, that appears in the dock when the application is l

Re: I need a milder application badge (solution)

2009-07-25 Thread Jay Reynolds Freeman
What I want to do is modify the dock icon while the application running. The only interface I can find to do this is NSApp.setApplicationIconImage: , which requires an NSImage. I have no way to get at the actual view being used to draw the dock icon, in order to subclass it; I have to creat

Re: I need a milder application badge (solution)

2009-07-25 Thread Kyle Sluder
On Jul 25, 2009, at 1:58 AM, Jay Reynolds Freeman > wrote: Well, mea culpa, I have not been speaking clearly; what I want to badge is not the dock tile but the dock icon, Not sure I understand what you're talking about. Do you mean to modify the application's icon even when it isn't running

Re: I need a milder application badge (solution)

2009-07-25 Thread Jay Reynolds Freeman
Well, mea culpa, I have not been speaking clearly; what I want to badge is not the dock tile but the dock icon, and I cannot find a way to get at the view for that, so as to install a special class: The interface seems to be through NSApp:applicationIconImage and NSAPP:setApplicationIconIma

Re: I need a milder application badge (solution)

2009-07-25 Thread Rob Keniger
On 25/07/2009, at 4:34 PM, Kyle Sluder wrote: I ended up finding a basically sane way to do this -- just one method, and I did not have to subclass NSView -- but with a large hack for one feature: Subclassing NSView is not a big deal. Just override -drawRect, draw the image you want, and dr

Re: I need a milder application badge (solution)

2009-07-24 Thread Kyle Sluder
On Jul 24, 2009, at 11:17 PM, Jay Reynolds Freeman > wrote: I ended up finding a basically sane way to do this -- just one method, and I did not have to subclass NSView -- but with a large hack for one feature: Subclassing NSView is not a big deal. Just override -drawRect, draw the image you

Re: I need a milder application badge (solution)

2009-07-24 Thread Jay Reynolds Freeman
> I have cause to display something like an application badge on > the docktile of my app, but [the regular one won't do] ... Solution (I think ...): I ended up finding a basically sane way to do this -- just one method, and I did not have to subclass NSView -- but with a large hack for one feat

Re: I need a milder application badge

2009-07-20 Thread Mike Abdullah
You'll need to draw the custom content yourself by using -[NSDockTile setContentView:] On 20 Jul 2009, at 10:33, Jay Reynolds Freeman wrote: I have cause to display something like an application badge on the docktile of my app, but the alarums-and-excursions feel of the standard bright red ba

I need a milder application badge

2009-07-20 Thread Jay Reynolds Freeman
I have cause to display something like an application badge on the docktile of my app, but the alarums-and-excursions feel of the standard bright red badge with zigzag edges is a bit too strident for what I have in mind. Can anyone point me at a scrap of code that would give me the functionality