38 BOOL _awakenCustomResources;
53 _awakenCustomResources = YES;
58 - (id)initWithContentsOfURL:(
CPURL)aURL
71 _awakenCustomResources = YES;
77 - (id)initWithContentsOfURL:(
CPURL)aURL loadDelegate:(
id)aLoadDelegate
87 _awakenCustomResources = YES;
89 _loadDelegate = aLoadDelegate;
97 if (![aName hasSuffix:
@".cib"])
111 - (id)initWithCibNamed:(
CPString)aName bundle:(
CPBundle)aBundle loadDelegate:(
id)aLoadDelegate
113 if (![aName hasSuffix:
@".cib"])
127 - (BOOL)instantiateCibWithExternalNameTable:(
CPDictionary)anExternalNameTable
129 var bundle = _bundle,
132 if (!bundle && owner)
135 var unarchiver = [[_CPCibKeyedUnarchiver alloc] initForReadingWithData:_data bundle:bundle awakenCustomResources:_awakenCustomResources cibName:_cibName],
136 replacementClasses = [anExternalNameTable
objectForKey:CPCibReplacementClasses];
138 if (replacementClasses)
141 keyEnumerator = [replacementClasses keyEnumerator];
143 while ((key = [keyEnumerator nextObject]) !== nil)
144 [unarchiver setClass:[replacementClasses objectForKey:key] forClassName:key];
147 [unarchiver setExternalObjectsForProxyIdentifiers:[anExternalNameTable
objectForKey:CPCibExternalObjects]];
149 var objectData = [unarchiver decodeObjectForKey:CPCibObjectDataKey];
151 if (!objectData || ![objectData isKindOfClass:[_CPCibObjectData
class]])
154 var topLevelObjects = [anExternalNameTable
objectForKey:CPCibTopLevelObjects];
156 [objectData instantiateWithOwner:owner topLevelObjects:topLevelObjects];
157 [objectData establishConnectionsWithOwner:owner topLevelObjects:topLevelObjects];
158 [objectData awakeWithOwner:owner topLevelObjects:topLevelObjects];
161 [objectData displayVisibleWindows];
166 - (BOOL)instantiateCibWithOwner:(
id)anOwner topLevelObjects:(CPArray)topLevelObjects
173 [nameTable setObject:anOwner forKey:CPCibOwner];
193 if ([_loadDelegate respondsToSelector:
@selector(cibDidFailToLoad:)])
194 [_loadDelegate cibDidFailToLoad:self];
201 if ([_loadDelegate respondsToSelector:
@selector(cibDidFinishLoading:)])
202 [_loadDelegate cibDidFinishLoading:self];
218 var base64 = [aCoder decodeObjectForKey:CPCibDataFileKey];
226 [aCoder encodeObject:[_data base64] forKey:CPCibDataFileKey];
236 - (BOOL)_awakenCustomResources
238 return _awakenCustomResources;
244 - (void)set_awakenCustomResources:(BOOL)aValue
246 _awakenCustomResources = aValue;
void connection:didFailWithError:(CPURLConnection aConnection, [didFailWithError] CPError anError)
A Cappuccino wrapper for any data type.
Provides loading of a URL request.
CPData sendSynchronousRequest:returningResponse:(CPURLRequest aRequest, [returningResponse]/*{ */CPURLResponse/*} */aURLResponse)
A mutable key-value pair collection.
BOOL instantiateCibWithExternalNameTable:(CPDictionary anExternalNameTable)
id requestWithURL:(CPURL aURL)
An immutable string (collection of characters).
id objectForKey:(id aKey)
CPData dataWithBase64:(CPString aString)
id initWithContentsOfURL:loadDelegate:(CPURL aURL, [loadDelegate] id aLoadDelegate)
id initWithContentsOfURL:(CPURL aURL)
CPData dataWithRawString:(CPString aString)
var CPCibBundleIdentifierKey
Used for encapsulating, presenting, and recovery from errors.
CPString lastPathComponent()
Defines methods for use when archiving & restoring (enc/decoding).
CPURLConnection connectionWithRequest:delegate:(CPURLRequest aRequest, [delegate] id aDelegate)
CPBundle bundleForClass:(Class aClass)
Contains data obtained during a request made with CPURLConnection.
CPString stringByAppendingString:(CPString aString)