• 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: KVC Problems with Indexed Accessor for To-Many Properties
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: KVC Problems with Indexed Accessor for To-Many Properties


  • Subject: Re: KVC Problems with Indexed Accessor for To-Many Properties
  • From: Scott Stevenson <email@hidden>
  • Date: Sat, 14 Oct 2006 18:38:22 -0700


On Oct 14, 2006, at 10:48 AM, joe OneNinetyTwo wrote:

I would love to stick with bindings, but it's still
not obvious how I can do it with a mutable "faked"
array and KVC indexed accessors.  - Philip

So you're technically doing what I suggested (figure out a way to make it work with Bindings), but the problem is that this is pretty detailed design work and we're all flying blind. I'm sure this is solvable, but not without spending time looking at how your project is setup.


Two things you can take away from all of this, though:

1. The objects your return from indexed accessors don't have to be NSManagedObjects. They can just be regular objects.

2. It's very common for a class to have the "real" data in an NSData blob, but to also have a secondary "cached" version stored as an NSString instance variable (or whatever you need). You only re- generated the secondary version when the first one changes.

A good example of this is managed objects that have an color property. The real color value is an NSColor object serialized to an NSData object. The "cached" version is a transient property (which means, it's not stored in the database) which has an "undefined" type.

Hope that helps.

    - Scott


_______________________________________________ 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
  • Follow-Ups:
    • Re: KVC Problems with Indexed Accessor for To-Many Properties
      • From: joe OneNinetyTwo <email@hidden>
References: 
 >Re: KVC Problems with Indexed Accessor for To-Many Properties (From: joe OneNinetyTwo <email@hidden>)

  • Prev by Date: handling events within NSWindow
  • Next by Date: Re: Re: How to load data from NSDictionary to NSTableView?
  • Previous by thread: Re: KVC Problems with Indexed Accessor for To-Many Properties
  • Next by thread: Re: KVC Problems with Indexed Accessor for To-Many Properties
  • Index(es):
    • Date
    • Thread