Re: Cross XIB references?
Re: Cross XIB references?
- Subject: Re: Cross XIB references?
- From: Jean-François Brouillet <email@hidden>
- Date: Sun, 06 Jun 2010 09:12:56 +0100
I can see that my question may not be very clear, so I'm taking another angle :)
A few years ago when Spring came out in Java land, I had an "Aha" moment when
I realised that it was just about creating singletons all over the place (Spring
calls them "beans") without the benefit of a nifty editor, and remember saying to
myself, "Gosh, here we go again, competition is catching up with Apple with a 10
years delay. They've just reinvented NIB files"
Despite this monstrosity called XML, Spring files *have to* be edited by hand, but
you can refer to anything in either that Spring file OR some other Spring file,
whether that second Spring file is loaded later or earlier than the first.
You do NOT have the benefits of an editor, but cross Spring file references are
a given.
Back to NIB (err ... XIB) files, I had a cursory look at the XML and thought to
myself: Well, they must call it progress, but here's an instance where Apple
has been corrupted by the outside and this format is inscrutable, clearly not meant
for human consumption, despite what the XML zealots claim as "human readable".
Thankfully, we've got a top notch editor (IB of course) that knows how to untangle
this mess, and making reference to object id 123 in file one.xib to object id 456
in file two.xib should be a walk in the park ...
Well, it looks like I'm in for some disappointment here. Yes, there is some form
of cross XIB references supported by IB (via the Attribute Inspector) but as far
as setting up a cross reference from any top level (aka: singleton) object to
any other object (top level or not) in some other nib file, it looks like either
IB does NOT support it, or, I was not able to discover the magic gesture that
would enable me to do so.
To be pristinely clear, I am *NOT* asking how I could programatically implement
awakeFromNib and perform the magic myself at runtime, but I am asking whether
cross NIB file references have a generic, builtin support, the same way as,
in Spring land, they defer instantiation until after they have been able to
construct the whole graph in memory: There I do *not* have to write Java code
to perform the wiring, and I would expect the same in IB/ObjC/NIB land.
Is that possible and how?
Many thanks
--
JFB
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden