Re: core data - beyond the simple example
Re: core data - beyond the simple example
- Subject: Re: core data - beyond the simple example
- From: Torsten Curdt <email@hidden>
- Date: Fri, 4 Apr 2008 21:39:43 +0200
OK ...so predicate filter I got working - sort of. I've bound the
predicate in the AppDelegate to the NSArrayController. When I start up
the application it filters just fine.
I've also got the "add" and "remove" actions bound to buttons. But as
soon as I call "add" the filtered objects re-appear and the predicate
seems to get not applied anymore.
Any thoughts on that?
@implementation AppDelegate
- (id) init {
self = [super init];
if (self) {
NSExpression *lhs = [NSExpression expressionForKeyPath:@"Name"];
NSExpression *rhs = [NSExpression
expressionForConstantValue:@"test2"];
NSPredicate *predicate = [NSComparisonPredicate
predicateWithLeftExpression:lhs
rightExpression:rhs
modifier:NSDirectPredicateModifier
type:NSNotEqualToPredicateOperatorType
options:0];
[self setFilter:predicate];
}
As for the table cell.... Creating a custom table cell doesn't seem to
be a big deal. But if I want to layout the controls through IB it
seems I either need to get the SubviewTable thing working with
bindings or just go Leopard and use NSCollectionView. There seems to
be quite a good example available.
http://developer.apple.com/samplecode/SourceView/index.html
cheers
--
Torsten
_______________________________________________
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