Allows to leave of the suffix .cib from the filenames of cib files (just like cocoa does and states in the documentation).

This commit is contained in:
Martin Häcker authored and Ross Boucher committed 2009-05-15 11:47:43 -07:00
1 parent e05816419e
commit ad58952a32
1 file changed
+3
+3
View File
@@ -78,6 +78,9 @@ var CPCibObjectDataKey = @"CPCibObjectDataKey";
- (id)initWithCibNamed:(CPString)aName bundle:(CPBundle)aBundle loadDelegate:(id)aLoadDelegate
{
if ( ! [aName hasSuffix:@".cib"])
aName = [aName stringByAppendingString:@".cib"];
// If aBundle is nil, use mainBundle, but ONLY for searching for the nib, not for resources later.
self = [self initWithContentsOfURL:[aBundle || [CPBundle mainBundle] pathForResource:aName] loadDelegate:aLoadDelegate];