• 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: core data - beyond the simple example
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: core data - beyond the simple example
      • From: "I. Savant" <email@hidden>
References: 
 >core data - beyond the simple example (From: Torsten Curdt <email@hidden>)
 >Re: core data - beyond the simple example (From: "I. Savant" <email@hidden>)
 >Re: core data - beyond the simple example (From: Torsten Curdt <email@hidden>)
 >Re: core data - beyond the simple example (From: "I. Savant" <email@hidden>)
 >Re: core data - beyond the simple example (From: Torsten Curdt <email@hidden>)

  • Prev by Date: NSRect for intertion point in NSTokenField (or NSTextField)
  • Next by Date: Re: core data - beyond the simple example
  • Previous by thread: Re: core data - beyond the simple example
  • Next by thread: Re: core data - beyond the simple example
  • Index(es):
    • Date
    • Thread