42 return [[
self alloc] initWithURL:aURL];
52 return [
self bundleWithURL:CFBundle.bundleForClass(aClass).bundleURL()];
62 aURL =
new CFURL(aURL);
68 return existingBundle;
74 _bundle =
new CFBundle(aURL);
108 return _bundle.resourcesDirectoryURL();
111 - (Class)principalClass
132 return _bundle.pathForResource(aFilename);
142 return _bundle.valueForInfoDictionaryKey(aKey);
145 - (void)loadWithDelegate:(
id)aDelegate
147 _delegate = aDelegate;
149 _bundle.addEventListener(
"load",
function()
151 [_delegate bundleDidFinishLoading:self];
157 _bundle.addEventListener(
"error",
function()
159 CPLog.error(
"Could not find bundle: " +
self);
167 var staticResourceURLs = [],
168 staticResources = _bundle.staticResources(),
170 count = [staticResources count];
172 for (; index < count; ++index)
173 [staticResourceURLs addObject:staticResources[index].URL()];
175 return staticResourceURLs;