Resources
-
Not really a bug, but how come the "Resources" folder when you generate an extension is capitalized?
On another note, what is the intended purpose of this folder?
-
Perfect!
-
the
ExtensionBundle
us written similarly asNSImage.imageNamed_
from AppKit import * print NSImage.imageNamed_("ExtensionIcon")
-
That's good to know about referencing images in a bundle. Is it also possible to reference the resources that are built in to RoboFont (like
extensionIcon.png
)?
-
If you look into any app bundle folder names are capitalized
The Resources folder is used for assets like image, everything except .py files.
This is handy in combination with an
ExtensionBundle
objectfrom mojo.extensions import ExtensionBundle myBundle = ExtensionBundle("MyBundleName") # assuming in the Resource folder there is a file called "myToolbarIcon.png" # when retrieving files from a bundle an extension is not required # this will return a NSImage object toolbarIcon = myBundle.get("myToolbarIcon")
see: