• 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
Textfields, formatters, localize and using binding.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Textfields, formatters, localize and using binding.


  • Subject: Textfields, formatters, localize and using binding.
  • From: Joakim Danielson <email@hidden>
  • Date: Mon, 17 May 2004 11:56:59 +0200

Hi

I've run into a problem I can't find a good solution to. Here is the situation:

I have created a GUI to to register and store transactions (for a stock portfolio program). The GUI is very simple with some popup-buttons, text fields and buttons.
The popup-buttons and the text fields are all bound to a NSObjectController. Four of the text fields contains numbers so I've attached a formatter to them and here is where my troubles start.

Since I'm Swedish I want to localize the fields so that the double 1000.99 is written as "1 000,99". For bound text fields formatting only works as long as the value is less than 1000, any larger value will generate a call to setNilValueForKey, that is any value containing a thousand separator!

Is this a bug or do I have to use formatters in a different way for bound fields?

I have tried to create and set the formatter in the code instead of IB but the result is the same. I should also mention that in my model class the responding attributes are doubles. I tried to change one to NSNumber but again, the result was the same.

Joakim
_______________________________________________
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.


  • Prev by Date: Re: problems dynamically specifying services for my application
  • Next by Date: Hiding NSTableColumns?
  • Previous by thread: Pinning to arbitrary NSSlider values
  • Next by thread: Fwd: Textfields, formatters, localize and using binding.
  • Index(es):
    • Date
    • Thread