Re: Bindings Problem

2010-01-20 Thread Carter R. Harrison
On Jan 18, 2010, at 4:55 PM, Ken Thomases wrote: > On Jan 18, 2010, at 11:01 AM, Jeffrey Oleander wrote: > >> http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/Collections/Articles/Sets.html >> >> "Set Fundamentals: Note that if mutable objects are stored in a set, either >

Re: Bindings Problem

2010-01-18 Thread Ken Thomases
On Jan 18, 2010, at 11:01 AM, Jeffrey Oleander wrote: > http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/Collections/Articles/Sets.html > > "Set Fundamentals: Note that if mutable objects are stored in a set, either > the hash method of the objects shouldn’t depend on the in

Re: Bindings Problem

2010-01-18 Thread Jeffrey Oleander
> On Sun, 2010/01/17, Ken Thomases wrote: >> On 2010 Jan 17, at 11:15, Jeffrey Oleander wrote: >>> On Sat, 2010/01/16, Ken Thomases > wrote: On 2010 Jan 14, at 17:11, Carter R. Harrison wrote: My model is an NSMutableSet that contains NSMutableDictionaries. >>> >>> I think this is

Re: Bindings Problem

2010-01-17 Thread Ken Thomases
On Jan 17, 2010, at 11:15 AM, Jeffrey Oleander wrote: >> On Sat, 2010/01/16, Ken Thomases wrote: >>> On 2010 Jan 14, at 17:11, Carter R. Harrison wrote: >>> My model is an NSMutableSet that contains >>> NSMutableDictionaries. >> >> I think this is asking for trouble. A set of mutable >> diction

Re: Bindings Problem

2010-01-17 Thread Jeffrey Oleander
> On Sat, 2010/01/16, Ken Thomases wrote: >> On 2010 Jan 14, at 17:11, Carter R. Harrison wrote: >> My model is an NSMutableSet that contains >> NSMutableDictionaries. > > I think this is asking for trouble.  A set of mutable > dictionaries doesn't make much sense. > > ..."Equal" is determined b

Re: Bindings Problem

2010-01-16 Thread Ken Thomases
In addition to what mmalc pointed you to, there are other red flags in your description: On Jan 14, 2010, at 5:11 PM, Carter R. Harrison wrote: > My model is an NSMutableSet that contains NSMutableDictionaries. I think this is asking for trouble. A set of mutable dictionaries doesn't make muc

Re: Bindings Problem

2010-01-14 Thread mmalc Crawford
On Jan 14, 2010, at 3:11 pm, Carter R. Harrison wrote: > In the addValueToSet: method I have the following code: > - (IBAction)addValueToSet:(id)sender > See

Bindings Problem

2010-01-14 Thread Carter R. Harrison
I'm sure what I'm trying to do is not that difficult but I've been pulling my hair out for a while now on this problem. I have an application whose model could be updated without the user directly doing anything. So bindings seems like the perfect fit b/c the interface will reflect these sorts

RE: Cocoa bindings problem

2009-10-31 Thread Squ Aire
Thanks, why didn't I think of that? Sounds obvious once known :) Thanks also for the transient property tip, will keep it at the back of my head for future use. In this case however I will go with the method as it is more suitable in my particular case. > >Thanks for the tip. However, the valu

Re: Cocoa bindings problem

2009-10-30 Thread Sean McBride
On 10/30/09 1:34 PM, Kyle Sluder said: >> Instead of a value transformer, in your NSManagedObject subclass add a >> new method called 'timelessDate' which returns a modified version of >> your 'date' attribute.  Then bind your table to 'timelessDate' instead >> of 'date'.  Also use keyPathsForValu

Re: Cocoa bindings problem

2009-10-30 Thread Kyle Sluder
On Fri, Oct 30, 2009 at 1:26 PM, Sean McBride wrote: > Instead of a value transformer, in your NSManagedObject subclass add a > new method called 'timelessDate' which returns a modified version of > your 'date' attribute.  Then bind your table to 'timelessDate' instead > of 'date'.  Also use keyPa

Re: Cocoa bindings problem

2009-10-30 Thread Sean McBride
On 10/30/09 7:01 PM, Squ Aire said: >Thanks for the tip. However, the value transformer idea did not work. >Even though it ended up showing exactly the same date (the value >transformer just strips the time from the date) for each row, selecting >multiple rows still leaves us with "Multiple values

RE: Cocoa bindings problem

2009-10-30 Thread Squ Aire
My last message seems to have messed up newlines. Sorry about that. I will now try again. The test app I made contains no code except for the value transformer. The stuff that is not code is just a Core Data model with one entity called "User", with two attributes "name" (string) and "lastLogi

RE: Cocoa bindings problem

2009-10-30 Thread Squ Aire
The test app I made contains no code except for the value transformer. The stuff that is not code is just a Core Data model with one entity called "User", with two attributes "name" (string) and "lastLogin" (date). The IB stuff is just one array controller bound to the app delegate's MOC with m

Re: Cocoa bindings problem

2009-10-30 Thread I. Savant
On Oct 30, 2009, at 3:01 PM, Squ Aire wrote: Thanks for the tip. However, the value transformer idea did not work. Even though it ended up showing exactly the same date (the value transformer just strips the time from the date) for each row, selecting multiple rows still leaves us with "Mul

RE: Cocoa bindings problem

2009-10-30 Thread Squ Aire
Thanks for the tip. However, the value transformer idea did not work. Even though it ended up showing exactly the same date (the value transformer just strips the time from the date) for each row, selecting multiple rows still leaves us with "Multiple values" in the text field. > > My problem

Re: Cocoa bindings problem

2009-10-29 Thread I. Savant
On Oct 29, 2009, at 9:44 PM, Squ Aire wrote: My problem is that when I bind a some text field to the "last login date" column, and choose multiple rows with same date (but NOT THE SAME TIME), I get "Multiple Values". Do you mean you have a separate NSTextView or NSTextField that is boun

Cocoa bindings problem

2009-10-29 Thread Squ Aire
Let's say I have a table view bound to an array controller which in turn is bound to a MOC... you all know how it works. The table view has two columns: "Name" and "Last Login Date". The thing is that in underneath in the model, the "last login date" is stored with both date and time informati

Re: Core Data / Bindings problem: context not notified of add: ?

2008-06-18 Thread Quincey Morris
On Jun 18, 2008, at 03:31, Alain Schartz wrote: My model consists of an abstract entity A and an entity B, with A being B's parent. Each entity is managed by it's own NSArrayController (mode set to Entity and correctly bound to the context), and each NSArrayController is bound to a NSTable

Core Data / Bindings problem: context not notified of add: ?

2008-06-18 Thread Alain Schartz
Hello list. I need help with a problem I suspect being a Core Data / Bindings hickup : My model consists of an abstract entity A and an entity B, with A being B's parent. Each entity is managed by it's own NSArrayController (mode set to Entity and correctly bound to the context), and each NSArr

Bindings problem

2008-02-21 Thread Lorenzo Thurman
I've been using bindings for user preferences, but now I've gotten a little more into the whole kvc/kvo thing, but have run into a problem:I have two array controllers. Each bound to my controller (not an nscontroller, just my main class), with a model key path pointing to arrays that are populate