FROM : Scott Stevenson
DATE : Thu Dec 02 21:18:25 2004
On Dec 2, 2004, at 8:00 AM, Graham J Lee wrote:
> However I've noticed that if a user enters an out-of-range number and
> then, rather than hitting return or tab, just presses e.g. a button,
> then the method invoked by that button does run and does see the
> current intValue of the field and hence crashes and burns. Now I've
> just noticed the existence of NSStepper, but before I [i]dig into that
> [ii]change my UI as a result, is there a way of making sure that the
> NSTextField's content is *definitely* validated before it is used?
Key-value validation?
http://developer.apple.com/documentation/Cocoa/Conceptual/
KeyValueCoding/Concepts/Validation.html
Works well with bindings.
- Scott
--
http://treehouseideas.com/
http://theobroma.treehouseideas.com/ [blog]
DATE : Thu Dec 02 21:18:25 2004
On Dec 2, 2004, at 8:00 AM, Graham J Lee wrote:
> However I've noticed that if a user enters an out-of-range number and
> then, rather than hitting return or tab, just presses e.g. a button,
> then the method invoked by that button does run and does see the
> current intValue of the field and hence crashes and burns. Now I've
> just noticed the existence of NSStepper, but before I [i]dig into that
> [ii]change my UI as a result, is there a way of making sure that the
> NSTextField's content is *definitely* validated before it is used?
Key-value validation?
http://developer.apple.com/documentation/Cocoa/Conceptual/
KeyValueCoding/Concepts/Validation.html
Works well with bindings.
- Scott
--
http://treehouseideas.com/
http://theobroma.treehouseideas.com/ [blog]
| Related mails | Author | Date |
|---|---|---|
| Graham J Lee | Dec 2, 17:00 | |
| j o a r | Dec 2, 17:14 | |
| Graham J Lee | Dec 2, 18:04 | |
| Scott Stevenson | Dec 2, 21:18 |






Cocoa mail archive

