From 88c64c5071ddcc5ababdb052d55be479bcfe8540 Mon Sep 17 00:00:00 2001 From: Tom Robinson Date: Wed, 22 Oct 2008 17:03:39 -0700 Subject: [PATCH 1/2] Temporary fix for lack of tag support in PLISTs (for nib2cib) --- Objective-J/plist.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Objective-J/plist.js b/Objective-J/plist.js index fb77aa7a6..625e10b34 100644 --- a/Objective-J/plist.js +++ b/Objective-J/plist.js @@ -241,6 +241,7 @@ var XML_XML = "xml", PLIST_BOOLEAN_FALSE = "false", PLIST_NUMBER_REAL = "real", PLIST_NUMBER_INTEGER = "integer"; + PLIST_DATA = "data"; #if RHINO @@ -409,6 +410,9 @@ function CPPropertyListCreateFromXMLData(XMLNodeOrData) case PLIST_BOOLEAN_FALSE: object = false; break; + case PLIST_DATA: object = FIRST_CHILD(XMLNode) ? CHILD_VALUE(XMLNode) : ""; // FIXME: temporary fix for NIBs with tags + break; + default: objj_exception_throw(new objj_exception(OBJJPlistParseException, "*** " + NODE_NAME(XMLNode) + " tag not recognized in Plist.")); } From f34265a864cf88711aac1b9bcf09437b2eb20f3a Mon Sep 17 00:00:00 2001 From: Tom Robinson Date: Wed, 22 Oct 2008 18:01:54 -0700 Subject: [PATCH 2/2] nib2cib fix for multiple subviews in a Custom View --- AppKit/Cib/_CPCibCustomView.j | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/AppKit/Cib/_CPCibCustomView.j b/AppKit/Cib/_CPCibCustomView.j index c0c70fce2..bffe2b357 100644 --- a/AppKit/Cib/_CPCibCustomView.j +++ b/AppKit/Cib/_CPCibCustomView.j @@ -73,7 +73,9 @@ var _CPCibCustomViewClassNameKey = @"_CPCibCustomViewClassNameKey"; [view setBounds:[self bounds]]; // Since the object replacement logic hasn't had a chance to kick in yet, we need to do it manually: - var subviews = [self subviews], + + // we need to copy subviews since each time we add a subview to a different view its removed from the original subviews array + var subviews = [[self subviews] copy], index = 0, count = subviews.length;