• 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
General approach to binding of text fields
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

General approach to binding of text fields


  • Subject: General approach to binding of text fields
  • From: Mike Abdullah <email@hidden>
  • Date: Wed, 15 Mar 2006 20:40:30 +0000

I have a text field in my app with a number formatter attached. What I have done is bind the value of it to the appropriate controller, and this works pretty nicely.

However, if I try to enter a blank value in the field and then switch to editing another field, my app complains about this (setNilValueForKey]: could not set nil as the value for the key length).

I am sure this is a fairly common issue, and so I wondered what the recommended solution is. The best that I can think of thus far is to implement setNilValueForKey in my data model for the field. However, that would mean writing an option to cover every key, which seems a little overly complex. Is this the only/best way?

Mike.
_______________________________________________
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


  • Prev by Date: Re: Getting a bullet into a NSString
  • Next by Date: Re: Transparent window for messages
  • Previous by thread: Re: Documentation clarification - NSPredicate LIKE operator?
  • Next by thread: NSPredicate: do they ignore [d] or do they?!?
  • Index(es):
    • Date
    • Thread