• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Best way to use bindings with NSMatrix
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Re: Best way to use bindings with NSMatrix (From: Ricky Sharp <email@hidden>)

  • Prev by Date: Re: WWDC 2005 - Is the value worth the price? (OT)
  • Next by Date: Re: ADC Core Data article
  • Previous by thread: Re: Best way to use bindings with NSMatrix
  • Next by thread: PreferencePane plugin: awakeFromNib gets called twice
  • Index(es):
    • Date
    • Thread