Re: LRFilterBar and Bindings
Re: LRFilterBar and Bindings
- Subject: Re: LRFilterBar and Bindings
- From: Keith Duncan <email@hidden>
- Date: Mon, 30 Jul 2007 14:00:02 +0100
Firstly I don't know if LRFilterBar is bindings capable, but if it is
then you can *fake* an array using indexed accessors. There is an
example of this in mmalc's Combatants sample code: http://homepage.mac.com/mmalc/CocoaExamples/controllers.html
Here the filter bar would be bound to the key produce -
- (unsigned int)countOfProduce {
return ([_produce count] + 4);
}
- (id)objectInProduceAtIndex:(unsigned int)index {
switch (index) {
case 0:
return NSLocalizedString(@"All Produce", @"");
case 1:
return NSLocalizedString(@"Fruits", @"");
case 2:
return NSLocalizedString(@"Vegetables", @"");
case 3:
return @"DIVIDER";
default:
return [_produce objectAtIndex:(index - 4)];
}
}
Typed in mail, usual warnings apply.
- Keith
_______________________________________________
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