Re: Object(s) instantiated multiple times issue
Re: Object(s) instantiated multiple times issue
- Subject: Re: Object(s) instantiated multiple times issue
- From: David Whittle <email@hidden>
- Date: Tue, 7 Feb 2006 23:04:09 -0500
On 2/7/06, gnat <gnat> wrote:
> What i'm seeing:
> The "global" object works exactly as I expect. But I am seeing the
> other objects apparently receive the notification multiple times. In
> running it in debug, what I found was that self had a different
> memory address each time the notification was received. Furthermore I
> was getting a number of receptions equal to the number of outlets for
> the object plus one (i'm guessing the object itself).
Ah the old "send a note to a mailing list and find the answer" :/
I messed up my -init methods and wasn't calling [super init] or
returning self. Once I fixed that, it now only does the init and
awakeFromNib once as expected.
It does seem odd though that it would attempt to recreate the object
rather than complain that no object was returned...
I would still appreciate feedback if there is a better way to
communicate between my objects though.
Thanks,
-dave
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden