Bug in NSImage?
Bug in NSImage?
- Subject: Bug in NSImage?
- From: Tito Ciuro <email@hidden>
- Date: Tue, 26 Aug 2003 10:48:50 +0200
Hello,
Usually, if NSImage is passed a file which doesn't understand, it
returns nil:
NSImage* tempImage = [[NSImage alloc] initWithContentsOfFile: somePath];
However, I found that [NSImage initWithContentsOfFile:] will exit the
method it's running on when it attempts to open a .rsrc file. I made a
workaround by creating a NSDictionary with known NSImage formats. If
the extension doesn't exist, I avoid the initialization.
Should't NSImage return nil with all non-known formats?
Thanks,
-- Tito
_______________________________________________
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.