42 return [[
self alloc] initWithURL:aURL];
52 var bundle = CFBundle.bundleWithIdentifier(anIdentifier);
56 var url = bundle.bundleURL(),
70 return [
self bundleWithURL:CFBundle.bundleForClass(aClass).bundleURL()];
80 aURL =
new CFURL(aURL);
86 return existingBundle;
92 _bundle =
new CFBundle(aURL);
126 return _bundle.resourcesDirectoryURL();
129 - (Class)principalClass
140 return _bundle.identifier();
150 return _bundle.pathForResource(aFilename);
160 return _bundle.valueForInfoDictionaryKey(aKey);
163 - (void)loadWithDelegate:(
id)aDelegate
165 _delegate = aDelegate;
167 _bundle.addEventListener(
"load",
function()
169 [_delegate bundleDidFinishLoading:self];
175 _bundle.addEventListener(
"error",
function()
177 CPLog.error(
"Could not find bundle: " +
self);
183 - (CPArray)staticResourceURLs
185 var staticResourceURLs = [],
186 staticResources = _bundle.staticResources(),
188 count = [staticResources count];
190 for (; index < count; ++index)
191 [staticResourceURLs addObject:staticResources[index].URL()];
193 return staticResourceURLs;
196 - (CPArray)environments
208 return [
super description] +
"(" + [
self bundlePath] +
")";