• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Object(s) instantiated multiple times issue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Object(s) instantiated multiple times issue


  • Subject: Re: Object(s) instantiated multiple times issue
  • From: Keith Wilson <email@hidden>
  • Date: Wed, 8 Feb 2006 15:48:54 +1100

You might like to look at NSUserDefaults for handling some of your global default values.
It works real neat with bindings in Interface Builder and then every method has immediate access to the value.


Keith from DownUnder


On 08/02/2006, at 3:04 PM, David Whittle wrote:

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:
40bigpond.net.au


This email sent to email@hidden

_______________________________________________ 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
References: 
 >Object(s) instantiated multiple times issue (From: gnat <email@hidden>)
 >Re: Object(s) instantiated multiple times issue (From: David Whittle <email@hidden>)

  • Prev by Date: Re: Nib files
  • Next by Date: Universal Binary Screensavers in 10.3?
  • Previous by thread: Re: Object(s) instantiated multiple times issue
  • Next by thread: Re: Object(s) instantiated multiple times issue
  • Index(es):
    • Date
    • Thread