I'm trying to create an NSImage
of the generic lcd icon found in /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/public.generic-lcd.icns
. Currently, I load this icon using the following code:
NSImage *icon = [[NSImage alloc] initWithContentsOfFile:@"/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/public.generic-lcd.icns"];
This clearly isn't a good way to load this image though, because if Apple decides to change the location of the icons this won't work anymore. I can't find a constant that loads the same icon though, like you can do for the computer image:
NSImage *icon = [NSImage imageNamed:NSImageNameComputer];
I found this question about icons, but none of the described methods work for me (apart from the direct URL). So my question is, how can I load the generic lcd image without using the full path?