Newbie: Numeric only NSTextField checked during typing

  • Hello,

    I have a NSTextField in a preference panel. This control is binded to
    a User Defaults value.
    I checked "Continuously Update Value" so the user don't have to press
    enter to save the settings.

    I would like to make this field a numeric only field. Blocking out
    every non numeric key entered in the
    field during typing.

    I tried to look in the mailing list but I'm very lost, could please
    give me some suggestions?

    Thank you,
    Davide
  • You want to look up "NSNumberFormatter". You should also read:

    file:///Developer/ADC%20Reference%20Library/documentation/Cocoa/
    Conceptual/DataFormatting/index.html

    --
    I.S.

    On Oct 4, 2006, at 3:03 PM, Davide Rivola wrote:

    > Hello,
    >
    > I have a NSTextField in a preference panel. This control is binded
    > to a User Defaults value.
    > I checked "Continuously Update Value" so the user don't have to
    > press enter to save the settings.
    >
    > I would like to make this field a numeric only field. Blocking out
    > every non numeric key entered in the
    > field during typing.
    >
    > I tried to look in the mailing list but I'm very lost, could please
    > give me some suggestions?
    >
    > Thank you,
    > Davide
    >
    > _______________________________________________
    > Do not post admin requests to the list. They will be ignored.
    > Cocoa-dev mailing list      (<Cocoa-dev...>)
    > Help/Unsubscribe/Update your Subscription:
    > http://lists.apple.com/mailman/options/cocoa-dev/idiotsavant2005%
    > 40gmail.com
    >
    > This email sent to <idiotsavant2005...>
previous month october 2006 next month
MTWTFSS
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          
Go to today