Re: Best way to use bindings with NSMatrix
Re: Best way to use bindings with NSMatrix
- Subject: Re: Best way to use bindings with NSMatrix
- From: James McConnell <email@hidden>
- Date: Tue, 05 Apr 2005 17:50:46 -0500
On 4/5/05 6:24 AM, "Ricky Sharp" <email@hidden> 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
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden