Re: core data - beyond the simple example

2008-04-05 Thread Torsten Curdt
On Apr 5, 2008, at 05:30, Ben Trumbull wrote: At 5:19 PM -0700 4/4/08, [EMAIL PROTECTED] wrote: It's a bummer the headstart videos are only available with a non-free ADC membership. really ? Did you try: Yeah ...did go through that. IB3

Re: core data - beyond the simple example

2008-04-04 Thread Ben Trumbull
At 5:19 PM -0700 4/4/08, [EMAIL PROTECTED] wrote: It's a bummer the headstart videos are only available with a non-free ADC membership. really ? Did you try: -- -Ben ___ Cocoa-dev mailing list (C

Re: core data - beyond the simple example

2008-04-04 Thread Torsten Curdt
On Apr 5, 2008, at 01:42, Quincey Morris wrote: On Apr 4, 2008, at 16:31, Torsten Curdt wrote: Got that working now ...except the predicate bug reported before. It seems that when I add another object a new predicate is set. And could that possibly be because [NSArrayController clearsFilt

Re: core data - beyond the simple example

2008-04-04 Thread Quincey Morris
On Apr 4, 2008, at 16:31, Torsten Curdt wrote: Got that working now ...except the predicate bug reported before. It seems that when I add another object a new predicate is set. And could that possibly be because [NSArrayController clearsFilterPredicateOnInsertion] defaults to YES like the

Re: core data - beyond the simple example

2008-04-04 Thread Torsten Curdt
I've followed some tutorials to get started but somehow I am a bit lost when I want to do some more complex things. This might actually be more because of bindings than because of core data. Or maybe I just did not look at the right place. Maybe you guys can give me some hints links and so

Re: core data - beyond the simple example

2008-04-04 Thread Torsten Curdt
On Apr 4, 2008, at 18:38, I. Savant wrote: Just think of something along the lines of @interface MyObject : NSObject { NSString *name; NSString *color; } In this case, as I said, just do it the easier way first so you understand what's involved. Then if you want a 'subview as a cell

Re: core data - beyond the simple example

2008-04-04 Thread Torsten Curdt
On Apr 4, 2008, at 23:53, Jim Correia wrote: On Apr 4, 2008, at 5:44 PM, Torsten Curdt wrote: - (void)setFilter:(NSPredicate*)newFilter { if (filter != newFilter) { [filter release]; filter = newFilter; } } - (NSPredicate*)filter { retur

Re: core data - beyond the simple example

2008-04-04 Thread Jim Correia
On Apr 4, 2008, at 5:44 PM, Torsten Curdt wrote: - (void)setFilter:(NSPredicate*)newFilter { if (filter != newFilter) { [filter release]; filter = newFilter; } } - (NSPredicate*)filter { return filter; } Is this the exact code you are us

Re: core data - beyond the simple example

2008-04-04 Thread Torsten Curdt
On Apr 4, 2008, at 22:49, I. Savant wrote: I already have implemented KVC according to ... you didn't include the actual implementation in your code listing, so we're forced to take your word for it. Therefore, I conclude that your assertion is false. ;-) - (void)setFilter:(NSPredicate*)new

re: core data - beyond the simple example

2008-04-04 Thread Ben Trumbull
Torsten, I've followed some tutorials to get started but somehow I am a bit lost when I want to do some more complex things. This might actually be more because of bindings than because of core data. Or maybe I just did not look at the right place. Maybe you guys can give me some hints links

Re: core data - beyond the simple example

2008-04-04 Thread I. Savant
> I already have implemented KVC according to ... you didn't include the actual implementation in your code listing, so we're forced to take your word for it. Therefore, I conclude that your assertion is false. ;-) Post your code so list members can verify. The day's over for me and I face a

Re: core data - beyond the simple example

2008-04-04 Thread Hamish Allan
On Fri, Apr 4, 2008 at 5:21 PM, Torsten Curdt <[EMAIL PROTECTED]> wrote: > Just think of something along the lines of > > @interface MyObject : NSObject > { > NSString *name; > NSString *color; > > } Take a look at /Developer/Examples/AppKit/DragNDropOutlineView/ImageAndTextCell.[hm]

Re: core data - beyond the simple example

2008-04-04 Thread Torsten Curdt
Any thoughts on that? Yes. Remember the prerequisites I mentioned? 4 - Bindings (and probably the required KVC/KVO concepts). This means "Key Value Coding" / "Key Value Observing". Lack of proper KVO encapsulation is

Re: core data - beyond the simple example

2008-04-04 Thread I. Savant
On Fri, Apr 4, 2008 at 3:39 PM, Torsten Curdt <[EMAIL PROTECTED]> wrote: > 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" actio

Re: core data - beyond the simple example

2008-04-04 Thread Torsten Curdt
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-app

Re: core data - beyond the simple example

2008-04-04 Thread I. Savant
> I'll give that a go, thanks. May I ask why NSImageCell? Actually, that was an incomplete thought. Using an NSImageCell would negate the need to subclass anything. You could just drag one into the appropriate column in Interface Builder, then bind the column to your color property. You can the

Re: core data - beyond the simple example

2008-04-04 Thread Torsten Curdt
Again me not being precise enough. So IIUC the NSTableView has NSTableColumns which have NSTableCells. I would have assumed that NSTableCells is also a view - which is why I talked about views. Right now the cell is a NSTextFieldCell. I somehow need to replace that with something bigger. Somet

Re: core data - beyond the simple example

2008-04-04 Thread I. Savant
> > Just think of something along the lines of > > > > @interface MyObject : NSObject > > { > > NSString *name; > > NSString *color; > > > > } > > In this case, as I said, just do it the easier way first so you > understand what's involved. Then if you want a 'subview as a ce

Re: core data - beyond the simple example

2008-04-04 Thread I. Savant
> Hm ...OK ...I just know there is a collection of data objects stored > through core data that I can make accessible through the bindings. But the "devil is in the details" as they say. Ignoring (or "not caring") about this *will* get you into trouble. > Again me not being precise enough. So

Re: core data - beyond the simple example

2008-04-04 Thread Torsten Curdt
On Apr 4, 2008, at 17:04, I. Savant wrote: I have got a little demo project. I have a NSTableView bound to a Core Data array of objects that where I can edit the name. So that was the first easy step. Here are a few more: A few points. First, you probably want (or meant) to bind a colum

Re: core data - beyond the simple example

2008-04-04 Thread I. Savant
> I have got a little demo project. I have a NSTableView bound to a Core Data > array of objects that where I can edit the name. So that was the first easy > step. Here are a few more: A few points. First, you probably want (or meant) to bind a column in your table view to some keypath. This