[Pyobjc-dev] Using pathForResource_
Brought to you by:
ronaldoussoren
From: David C. <da...@ne...> - 2003-01-11 18:18:51
|
Right now I am using an absolute path to reference my icons... naturally I want to change things so the icons are a resource in the project. I have moved the files into the project and added them to the copy phase. I think I should be able to do something like this -- no_tunnel_image = NSBundle.mainBundle.pathForResource_ofType_inDirectory_( "no_tunnels", "png", '' ) -- but I consistently get this error -- 2003-01-11 13:16:51.664 NewTunnels[2990] Exception raised during posting of notification. Ignored. exception: 'objc.native_selector' object has no attribute 'pathForResource_ofType_inDirectory_' -- I have also tried just 'pathForResource_' and a few other permutations unsuccessfully. Ideas? David. |