Hey guys,

I've been working on Xcode 5.x XIB support.  Here are a few observations:
4.6 XIBs used the existing encoding keys to encode information, 5.x XIBs do
not.  They appear to use a recursive/container driven approach which uses
the getter/setter (properties) methods as keys to fill in the information
in the objects from the XML.

Because of this some methods, such as initWithCoder: will not be called
while the model is being loaded.  While we could add yet another section to
the existing initWithCoder methods, it seems pointless to do this.   This
might be a source of issues, but since the current Xcode/IB doesn't include
the concept of user defined palettes, this might not be much of an issue
and should only occur in rare cases if at all.

Additionally connections and related objects are contained within each
object in the XML as opposed to referenced.  This means that instead of
having a pointer to an array of contained objects, those objects are right
there inside the containing object.   For example... in a 4.6 XIB, there
will be an array of menu items in the objects array (the objects array in a
4.6 XIB or, indeed, a NIB file is the container which contains ALL objects
stored therein).   The array will contain a set of references (by position)
to each menu item which is also stored at a given position in the objects
array and the menu itself will reference the items array, by it's position
in the objects array.  By contrast, in a 5.x XIB these objects are simply
contained in the menu instance and those items contain any connections they
have to any methods.  Objects are referenced by id and not position.   5.x
XIB files are, thus, fundamentally different from previous versions.  I
believe the only reason they still called them XIB files is because they
are XML and generated by Interface Builder.  Other than that they are a
completely different format.

Because of some of the above factors I've considered moving the code I am
currently working on outside of GUI and making it part of GORM and creating
a tool which links to GormCore and GormLib to allow it to transform XIB
files into .gorm files during a build.   It is still possible to finish the
code and load them directly, as long as the above limitations are
understood.

I'm wondering if anyone else has any thoughts or feelings on this matter.
 If so, please make them known.

Thanks, GC
-- 
Gregory Casamento
Open Logic Corporation, Principal Consultant
yahoo/skype: greg_casamento, aol: gjcasa
(240)274-9630 (Cell)
http://www.gnustep.org
http://heronsperch.blogspot.com
_______________________________________________
Discuss-gnustep mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep

Reply via email to