Re: Using a Core Data relationship binded to an NSTokenField

2008-06-08 Thread William Turner
On Jun 8, 2008, at 2:53 PM, Orestis Markou wrote: I have a list of articles, binded to an NSArrayController binded to an NSTableView. Each article can have multiple authors, which I want to display in one row, using an NSTokenField. It seems like the NSTokenField expects an NSArray, and it

Re: Core Data Questions

2008-06-07 Thread William Turner
Hi Gordon, If you're designing a data model using Core Data, it's actually very useful to step back and look at your data the way a layperson would. By this I mean forget about classes and inheritance and all that stuff. You can come back to it later, but the main thing is to look at the

Re: Cocoa et al as HCI usability problem

2008-05-21 Thread William Turner
I'm curious: On May 21, 2008, at 3:58 PM, Rua Haszard Morris wrote: - lack of and generally un-useful sample code There is quite a lot of sample code at developer.apple.com. Did you know? What would make it more useful? - too much "cocoa is wonderful" vs. not enough dry detail So seve

Re: Observer CoreData Objects changes

2008-04-27 Thread William Turner
A few additional things to consider: 1) Avoid overriding validateValue:forKey:error (see "Property-Level Validation" in http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/Articles/cdValidation.html) 2) Avoid overriding initWithEntity:insertIntoManagedObjectContext: (see "Met

Re: Initial value of on/off buttons

2008-04-27 Thread William Turner
Just a little addendum here... You aren't strictly _required_ to use an NSObjectController (or other NSController subclass), but in practice it is generally better to do so. Yes, you can bind your views directly to your controller classed, but that's not really the ideal pattern - see http:

Re: Library-Object in NSPersistentDocument but not in XML-file

2008-04-25 Thread William Turner
Hi Mike, Are you assigning the entities to different configurations? Wil On Apr 23, 2008, at 4:28 PM, Mike Donovan wrote: Hello everybody! In my document-based core data application I have a outline view which displays a list of departments like this (similar to iTunes): COMPANY [Item] -- Al

Re: Obj-C idioms for list based tasks

2008-04-07 Thread William Turner
On Apr 7, 2008, at 5:33 AM, Paul Sargent wrote: Can anybody suggest a good way to: 1) Given an ordered set of objects, create a new non-mutable ordered set, with all the duplicates removed? You could do this using the KVC set and array operators (http://developer.apple.com/documentation/C

Re: Core Data & Sheet problem

2008-03-26 Thread William Turner
You might want to look at the commitEditing method for the NSController subclasses - this pushes any pending changes to the underlying model. In your case, you would probably invoke that on the tree controller that provides your outline view content right before ordering the sheet out. Wi