Re: Loading image resources
Re: Loading image resources
- Subject: Re: Loading image resources
- From: Charles Jenkins <email@hidden>
- Date: Sun, 14 Sep 2014 00:33:55 -0400
*Sigh* I seem to make a typo every time I post to this list. Of course I meant that the imageFileName returned by the API call is nil.
--
Charles Jenkins
On Saturday, September 13, 2014 at 5:12 PM, Quincey Morris wrote:
> On Sep 13, 2014, at 12:28 , Charles Jenkins <email@hidden (mailto:email@hidden)> wrote:
>
> > After calling bundle.pathForResource:ofType:, imageName is nil. I think what I’m doing is what the Resource Programming Guide says to do. How am I getting it wrong?
>
> a. Yes, but did you check whether bundle or imageFileName is nil? Is imageFileName the correct path to where the files actually are?
>
> b. No one should be using path-based API any more, generally. You should use URL-based equivalents.
>
> c. IAC, there’s an easier way. For example:
>
> folderImage = NSImage.imageNamed (@“Folder”);
>
> No mucking about with paths or URLs!
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden