Re: Implementing previous, next, first, last controls in Core Data applications
Re: Implementing previous, next, first, last controls in Core Data applications
- Subject: Re: Implementing previous, next, first, last controls in Core Data applications
- From: "I. Savant" <email@hidden>
- Date: Sun, 12 Jul 2009 09:48:38 -0400
On Jul 12, 2009, at 8:51 AM, Ian Piper wrote:
Can anyone tell me whether there are any plug-ins or examples that
show how to implement buttons to move forward and backward through a
record set in a Core Data application? I am thinking of having a
window that simply presents one record from a collection, with
forward, backward, first and last buttons.
This isn't really a "Core Data" question, but rather a bindings
question.
Read up on Cocoa Bindings and NSArrayController. All you need to do
is modify the selection as desired when these buttons are pressed via -
[NSArrayController setSelectionIndex:] or -[NSArrayController
setSelectionIndexes:], keeping in mind the array controller's -
arrangedObjects (and the count thereof).
If the rest of your detail view is bound to this array controller's
selectedObjects.whateverKeys, you're done.
--
I.S.
_______________________________________________
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