In <1060811321.698956sj-nntpcache-5> Jamal Bernhard wrote:
Don't *fight* the AppKit - *use* it. You don't get an action message> 2. If I edit data in one of the text fields but don't deselect the
> text field (via tab, return, clicking on another control, etc) before
> I click on my "OK" button to close the window, no action is sent.
from a textfield under those cirstances, so don't set things up in
such a way that you rely on this. That is not what an action message in
a textfield is for.
What you want to do (keep track of the values of the textfields without
polling them all as the window closes) is perfectly reasonable. But you
need to drop back ten yards and punt. There are many, many perfectly
good ways to do this - implement windowDidUpdate:, implement
controlTextDidChange, use an NSFormatter, etc., etc. - but you aren't
going to think of *any* of them if you keep trying to use the AppKit in
a way that's not intended.
matt neuburg, phd = [email]matttidbits.com[/email], [url]http://www.tidbits.com/matt[/url]
REALbasic: The Definitive Guide! 2nd edition!
Subscribe to TidBITS. It's free and smart.