• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Access to localized images in a plug-in
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Access to localized images in a plug-in


  • Subject: Access to localized images in a plug-in
  • From: Steve Weller <email@hidden>
  • Date: Sat, 16 Jun 2007 09:55:28 -0700

I am in the process of localizing my Aperture plug-in called Random Wok. I have a TIFF image that used to be in the Resources folder that has been localized and so is now in the lproj folders. It needs localizing because it contains the text "No Image".

I used to use this code:

// Returns displayed image for table for a specific image
-(NSImage *)thumbnailForImageAtIndex:(unsigned)index;
{
NSImage *thumb;

// Get the thumbnail
thumb = [_exportManager thumbnailForImageAtIndex:index size:kExportThumbnailSizeMini];
if(nil==thumb) {
NSString *noThumbPath = [[_bundle resourcePath] stringByAppendingPathComponent:@"NoImage.tiff"];
NSImage *nothumb = [[[NSImage alloc] initWithContentsOfFile:noThumbPath] autorelease];
thumb = nothumb;
}

return [[thumb retain] autorelease];
}


But it no longer works because the folder structure has changed. I would use - (NSString *)pathForResource:(NSString *)name ofType: (NSString *)extension inDirectory:(NSString *)subpath

with subpath set to nil but there is no place to specify the bundle to use. In my case I cannot use the main bundle because that belongs to Aperture. I need a version of this that allows me to choose the bundle. Does such a method exist, or do I need to roll my own?

--
Bagelturf Blog  http://www.bagelturf.com/



_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


  • Follow-Ups:
    • Re: Access to localized images in a plug-in
      • From: "Jim Turner" <email@hidden>
  • Prev by Date: Re: Resolution-independent toolbar icons
  • Next by Date: Bezierpath transformation problem
  • Previous by thread: Re: NSImageWell - missing in action?
  • Next by thread: Re: Access to localized images in a plug-in
  • Index(es):
    • Date
    • Thread