On 6 Jun 2010, at 09:38, Ken Thomases wrote:

> On Jun 6, 2010, at 3:12 AM, Jean-François Brouillet wrote:
> 
>> [...] 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 ...
> 
> You're still not getting it.  There are no such objects.  NIBs are object 
> graph templates, not object graphs.  If two.xib is loaded twice, to which 
> "object id 456" does "object id 123" have a connection?

In the same exact way that "spring files" are object graph *templates* and not 
object graphs.

It would be more effective to just answer "No. What you say you want is not 
supported" rather than missing the point.

I gave a very concrete use case of my "singleton" thing.

I have ONE (=singleton) UINavigationController that contains one navigationItem 
that contains one titleView.

This controller is my "root controller" I want and need exactly ONE such 
controller.

In my XIB file I then create one of those UIViewImage "proxy object" (yes, just 
a template) and in that template I say: BTW the image (UIImage, another 
"proxy/template") I want is: xyz.png.

I then connect my titleView to that "proxy".

Done. End of story. Next. Just works. No awakeFromNib magic or what not.

Now in *another* nib file I have *another* controller and I wanted to tell it: 
"BTW the image you want is in nib file 1, object id 789"

The consensus here seems to be that this is not possible, but please, stop 
telling me that it doesn't make sense.

So, I've got the message, thank you, and I'm going to *programatically* share 
that view either in the app delegate or the root view controller, whichever way 
is cleanest.

But hint to Apple & whoever maintains NSBundle & the IB connexion: I may not be 
the only one missing the generalised support of cross file references the way 
the otherwise grossly inferior Spring does it.

>> 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.
> 
> You keep referring to "singleton" in a way which makes no sense to me.  
> Singleton's have nothing to do with NIBs, as far as I see.  In fact, it's 
> pretty difficult to imagine how a singleton could be contained in a NIB.

My mistake. I shouldn't have used the word "singleton". What I mean is 
"distinguished instance".

Many Thanks
--
JFB_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to