简体   繁体   中英

Customize error message in NSTextField with NSNumberFormatter

I'm working on a little project to learn Objectiv-C. Now I run into a problem:

I had create a Cocoa application with a NSTextField with NumberFormatter. Now, if the user clicks on the text field an try to insert some stuff like "asd" he hears an error peep.

But I want to give the user some future information about the error, maybe with an panel or something like that. How can I receive this error message an can add my own functions?

Thanks for your help

There should be a callback from any method of NSNumberFormatter that returns YES/NO.

Even if it does not have, subclass it and add your own method.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM