Re: [Pyobjc-dev] Changing the dock icon
Brought to you by:
ronaldoussoren
From: <bb...@ma...> - 2003-01-09 03:19:42
|
Try NSImage.alloc().initWithContentsOfFile_()... -initWithContentsOfFile: is an instance method, not a class method. That error message is slightly obscure, but that is what it means. b.bum On Wednesday, Jan 8, 2003, at 20:18 US/Eastern, David Casti wrote: > 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' |