• 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
Indexed Accessors: non-array model data
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Indexed Accessors: non-array model data


  • Subject: Indexed Accessors: non-array model data
  • From: Brent Gulanowski <email@hidden>
  • Date: Wed, 28 Jul 2004 22:58:07 -0400

I'm having a headache over the right (best, easiest, most sensible)
way to ensure that my indexed accessors work properly when the source
for the indexed data is not an array. I seem to be having problems
guaranteeing that the indices are being respected.

Currently I'm working with Address Book. I haven't done any testing to
see if arrays of records from Address Book are consistently ordered,
but I have already run into a problem that makes me suspect, although
I'd think it would be more of a problem with a Set or a dictionary
(though then I wouldn't use indexed accessors, of course). I mean, you
can implement -insertObjectIn<key>:atIndex: but if you're model isn't
actually indexed but does use a collection which also doesn't use
keys...

My initial strategy was to wrap the ABAddressBook singleton with a
object to make it KVC compliant. (And wrapped all the records, too.)
But when I tied a controller to it and a button for -insert: to the
controller, inserting and then requesting the selected object doesn't
get me the new instance, even though selectsInsertedObjects is set to
YES. Very frustrating! And I'm not sure where to start searching for
the source of the problem, so I've given up and built a custom
controller without bindings for the moment.

--

Brent Gulanowski
http://www.boredastronaut.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Prev by Date: Re: Extracting lines from a buffer
  • Next by Date: Re: Bound UI elements not showing 'description' as expected
  • Previous by thread: Re: Extracting lines from a buffer
  • Next by thread: NSURL Accept-Encoding: gzip question
  • Index(es):
    • Date
    • Thread