Re: [Pyobjc-dev] Changing the dock icon
Brought to you by:
ronaldoussoren
From: David C. <da...@ne...> - 2003-01-09 01:18:12
|
On 1/8/03 5:11 PM, "Ronald Oussoren" <ous...@ci...> wrote: > You can use either AppKit.NSApp(), a function instead of a global > variable, or NSApplication.sharedApplication() to access the > NSApplication instance for your application. OK, I've got AppKit.NSApp() going, but I need to feed an NSImage into The line I'm using is -- closed_image = NSImage.initWithContentsOfFile_( '/Users/david/Documents/gr-star.tif' ) -- which results in the following error -- 2003-01-08 20:10:31.855 NewTunnels[851] First argument must be an objective-C object, got '/Users/david/Documents/gr-star.tif' -- the documentation for NSImage seems to suggest that I can put a path into the function. What is the correct way to create the NSImage so I can then put that image into NSApp().setApplicationIconImage_ to change my dock icon? Thanks, David. |