• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Updating Miniwindow icon
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Updating Miniwindow icon


  • Subject: Updating Miniwindow icon
  • From: Derek Chesterfield <email@hidden>
  • Date: Sun, 20 Jul 2003 16:27:59 +0100

I am having lots of problems understanding how to update the Dock tile for a minimised Cocoa window. I have searched archives here and at macosx-dev, but the emails just confirm what I *thought* should work.

I am trying to mimic the way OmniWeb updates a minimised window's tile when the webpage has finished loading, using a didFinishLoadForFrame: delegate message in WebKit. While trying various approaches, I have come up against a number of issues (note that I have set AppleDockIconEnabled in my applications defaults, and setting it to @"YES" or TRUE does not make a difference):

The only way I can see to do what I want in Cocoa is by the setMiniwindowImage: method
- if I try to create an NSData using dataWithPDFInsideRect (or EPS), it returns 0 bytes if I include the WebView in the rect. If I set the rect to some area of the contentFrame that does not include the WebView, then I get the PDF
- after getting a PDF of part of my window, I create the NSImage, then setMiniwindowImage: changes the tile, but it appears to be garbled
- even if I were able to get the whole contentView to image, I still don't understand how I would get the tile to look like a mini window, rather than a mini view, or how I would get the app badge on the tile

While trying to understand all this, I was thinking how hard it is (even if it worked) when the OS does it automatically when the window is minimised - surely there is an easier way? Then I stumbled on Carbon's UpdateCollapsedWindowDockTile, so I tried calling that:
- in my code I have WindowRef windowRef=[[self window] windowRef] (self is my NSWindowController). In the debugger, after stepping over this line, the debugger shows windowRef has been updated, but the Summary shows title="", even though the actual NSWindow does have a title. Does this indicate that windowRef isn't really pointing to a WindowRef? Does the -[NSWindow * windowRef] message do what I expected - return a Carbon version of my NSWindow?
- when I call UpdateCollapsedWindowDockTile passing my suspect windowRef, the tile does not update. Maybe this is because the windowRef I am passing is not what I think it is

Where am I going wrong?

Thanks

Dez
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Problem receiving key events in CLI created window
  • Next by Date: Becomeing foreground process [was âRe: Problem receiving key events in CLI created window]
  • Previous by thread: "receiver cannot handle this message"
  • Next by thread: Breaking on NSAssert() ???
  • Index(es):
    • Date
    • Thread