Skip navigation.
 
mlRe: Best way to use bindings with NSMatrix
FROM : James McConnell
DATE : Wed Apr 06 00:50:46 2005

On 4/5/05 6:24 AM, "Ricky Sharp" <<email_removed>> wrote:
>
> When you mention "went to save", what exactly does that mean?  If you've bound
> selectedTag, both model-initiated and view-initiated (NSMatrix) changes will
> do the right thing.  How are you then saving your model?  Does it conform to
> NSCoding?  Or, do you use dictionaryWithValuesForKeys:?
>
> Definitely provide some code.
>
> --
> Rick Sharp
> Instant Interactive(tm)
>


Ricky, thanks for the reply.  Sorry for not including enough info, I had a
feeling I wasn't.  When I get to work tonight, I'll be more clear and copy
the relevant code.  Basically, when I mean I "went to save", I went to
File->Save, saved the file to my Desktop, then the Log window in Xcode told
me I was trying to insert a nil value into my dictionary.

When I save, I'm loading key/value pairs of my model values into a
dictionary, then writing the dictionary to disk using
writeToFile:atomically.  When that happens (when I tried bindings), I was
told I was attempting to insert a nil value into my dictionary, which I
assumed meant that the bindings weren't working and that specific model ivar
wasn't set to anything.  I'll provide relevant code tonight and give it
another shot.

Can you bind to primitive ivars?  Or can you only bind to objects?

James

Related mailsAuthorDate
mlBest way to use bindings with NSMatrix <java_nutt Apr 5, 07:12
mlRe: Best way to use bindings with NSMatrix Ricky Sharp Apr 5, 13:24
mlRe: Best way to use bindings with NSMatrix James McConnell Apr 6, 00:50