Re: initWithCoder: called on objects in nibs
Re: initWithCoder: called on objects in nibs
- Subject: Re: initWithCoder: called on objects in nibs
- From: Ondra Cada <email@hidden>
- Date: Thu, 25 Jul 2002 23:13:00 +0200
On Thursday, July 25, 2002, at 09:28 , Adrian Rutledge wrote:
I seem to recall someone saying that was the case, and suggesting using
that to create an a single instance shared across several nib files. I
took a try at this and my initWithcoder: doesn't get called, though I
know the nib its in (MainMenu.nib) is being loaded. Its rather odd and
frustrating. Did I misread the posts on here or am I just missing
something obvious?
Nope. You are missing something pretty complicated instead.
For NIBbed objects, _sometimes_ initWithCoder: is used, but not always: it
depends on whether the object is part of standard frameworks or not. The
thing is, standard objects are just simply archived. Non-standard ones
though are represented by a proxy, which effectively creates the needed
instance instead of unarchiving itself; although the NIB thing is
*conceptually* simple, in all details it is quite confusing.
I would really recommend *not* to go this way, unless you really have to.
It can be done, but it is unnecessarily complicated for a vast majority of
tasks.
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.