Loadable Nib Views
Loadable Nib Views
- Subject: Loadable Nib Views
- From: Steve Bennett <email@hidden>
- Date: Thu, 08 Nov 2001 16:42:31 -0500
We're developing a Cocoa application where the application will be supplied
(by a third party) with a bundle containing one or more Nib files. In each
of the Nib files, there will be a set of N custom Views of several possible
classes and names.
I'm still fairly new to Cocoa, so there's a couple of things I haven't been
able to find in the documentation that I need to understand better.
Hopefully someone here knows the details...
1) The views are custom views, and can contain custom subviews. The problem
is, the actual interfaces (data and available methods) may have to change
without our being able to change the Nib files making use of them.
What we'd like to do is provide a header file which defines *only* the
IBOutlet and IBAction entries of each needed class. This header will be
used by the people making the Nib to make the necessary connections, but a
different header with the full class interface definition will be used in
the application.
Will this work? Does the Nib file maintain details about the class
interface structure, or does it just maintain a list of outlet and action
names, and compare that against the actual class implementation in the
application which loads it?
2) If my application knows the Nib filename containing a view and the name
of a view within that file, how does it get the pointer to the actual view
object? The documentation on NSBundle Additions tells me how to load the
Nib, but nothing understandable on how to enumerate or access the objects
within it, and I've done a Google search but came up with nothing better.
-->Steve Bennett