• 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: Multiple Observations
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multiple Observations


  • Subject: Re: Multiple Observations
  • From: Gordon Apple <email@hidden>
  • Date: Sat, 15 Jun 2013 10:08:51 -0500
  • Thread-topic: Multiple Observations

I shouldn¹t need to look at the context.  However, I did try it using a
specified context (and check for it) and got the same result.  The setter is
only getting called once.

OMG!  I thought for sure I had checked awakeFromNib.  That is the problem.
My view-based outline view has issues.  makeViewWithIdentifier:owner: is
causing the owner¹s awakeFromNib to get called each time.  It looks like I
have run into another bug in view-based outlineViews.  Bug report time.  I¹m
going to have to figure out how to get around this.  Maybe set a flag to
insure awakeFromNib only gets called once.

These cell views are described as having their own mini-nib within the nib.
Somehow, they call awakeFromNib, which gets propagated to the owner instead.
Arrrrg!

When did awakeFromNib become a protocol? I¹m currently running a later
system, but this issue was present earlier.


On 6/14/13 3:31 PM, "Quincey Morris" <email@hidden>
wrote:

> On Jun 14, 2013, at 13:06 , Gordon Apple <email@hidden> wrote:
>
>> ³currentPath² property in doc gets set once.  Observation gets dinged about
>> 200 times.  Removing the ³reloadData² didn¹t affect this.  Same observer in
>> another file gets dinged once, like it should.  Stack trace always leads
>> back to where "currentPath" is set in doc.  Any theories on what could cause
>> this observer to have diarrhea?
>
> If the stack trace indicates that the observation is triggered by the
> "currentPath" setter, then you're looking for your bug in the wrong place. The
> problem is (prima facie) that the setter is being invoked multiple times. The
> cause is further up the call stack.
>
> BTW, I hope your real code isn't (a) using a nil context and (b) failing the
> check the context in the observation method.
>
>
On 6/14/13 4:30 PM, "Lee Ann Rucker" <email@hidden> wrote:

If it's not multiple calls to the setter, could it be multiple calls to
awakeFromNib? What does the observationInfo on self.doc look like?



_______________________________________________

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


  • Follow-Ups:
    • Re: Multiple Observations
      • From: Kyle Sluder <email@hidden>
References: 
 >Re: Multiple Observations (From: Quincey Morris <email@hidden>)

  • Prev by Date: First Responder on iOS
  • Next by Date: Re: Multiple Observations
  • Previous by thread: Re: Multiple Observations
  • Next by thread: Re: Multiple Observations
  • Index(es):
    • Date
    • Thread