• 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: [Q] "auto"-incrementing integer attribute in awakeFromInsert
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Q] "auto"-incrementing integer attribute in awakeFromInsert


  • Subject: Re: [Q] "auto"-incrementing integer attribute in awakeFromInsert
  • From: "Sean McBride" <email@hidden>
  • Date: Wed, 18 Mar 2009 12:17:28 -0400
  • Organization: Rogue Research Inc.

On 3/18/09 11:52 AM, Jon C. Munson II said:

>What happens is the attribute is set with the correctly incremented number.
>However, the tableview that is used to manage this entity displays two rows
>every time a new entity is inserted.

Fetching from awakeFromInsert is discouraged.  There are some bugs/
problems.  If you have an NSArrayController that will make use of the
object you're inserting (seems to be your case), it will receive
duplicate KVO notifications.  Please file a bug with a repro case to Apple.

>So, my question is, how do I resolve the two-row error, or, is there a
>better way?

You're best bet is using performSelector:withObject:afterDelay: in
awakeFromInsert, that way you're not fetching in awakeFromInsert.

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


_______________________________________________

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: [Q] "auto"-incrementing integer attribute in awakeFromInsert
      • From: "Jon C. Munson II" <email@hidden>
References: 
 >[Q] "auto"-incrementing integer attribute in awakeFromInsert (From: "Jon C. Munson II" <email@hidden>)

  • Prev by Date: [Q] "auto"-incrementing integer attribute in awakeFromInsert
  • Next by Date: [Q] Contextual Menu Items Size
  • Previous by thread: [Q] "auto"-incrementing integer attribute in awakeFromInsert
  • Next by thread: RE: [Q] "auto"-incrementing integer attribute in awakeFromInsert
  • Index(es):
    • Date
    • Thread