• 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
Tuning KVO validation.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Tuning KVO validation.


  • Subject: Tuning KVO validation.
  • From: Óscar Morales Vivó <email@hidden>
  • Date: Wed, 25 Feb 2004 12:17:53 +0100

I've been hacking my small measure unit conversion utility I built to learn about controllers and KVO. You can download it (the project itself) at http://homepage.mac.com/oscarmv/iMigrate.sitx

Last thing I did was adding validation to some values that had to be between 0 and 12. It works fine, but the behaviour of the application isn't exactly what I'd like. Being that the docs on that part are either incomplete or too hard to find, I'd like to ask some kind soul on the list to give me a hand.

Right now, those keys that go through validation work find, but the related text fields allow for inputting any number. It just doesn't go into the model and displays a message when exiting the field. For those that download the app, they are the lengthRemainingInches and weightRemainingOunces model properties.

What I want is for a bad validation to make the computer beep and revert the UI to its previous value, but I don't know how to go about it properly (i.e. not in model code itself as that would be bad style).

Any help will be appreciated.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Tuning KVO validation.
      • From: Allan Odgaard <email@hidden>
  • Prev by Date: Problems with Distributed Objects
  • Next by Date: Re: Tuning KVO validation.
  • Previous by thread: Re: Problems with Distributed Objects
  • Next by thread: Re: Tuning KVO validation.
  • Index(es):
    • Date
    • Thread