Re: NSFormatter troubles (was: NSScanner troubles)

2010-12-11 Thread WT
On Dec 11, 2010, at 10:31 PM, Scott Ribe wrote: > On Dec 11, 2010, at 4:52 PM, WT wrote: > >> My understanding is that setting a style is useful when you want to output a >> string from a given number or date, not when you want to read in a number or >> date from an input string. How would I kn

Re: NSFormatter troubles (was: NSScanner troubles)

2010-12-11 Thread WT
On Dec 11, 2010, at 10:25 PM, Stephen J. Butler wrote: > On Sat, Dec 11, 2010 at 5:58 PM, WT wrote: >> [wrt NSNumberFormatter] However, setUsesGroupingSeparator:YES still has no >> effect for me. >> >> May I send you (off-list) the test project? > > For those following along at home, this happ

Re: NSFormatter troubles (was: NSScanner troubles)

2010-12-11 Thread Scott Ribe
On Dec 11, 2010, at 4:52 PM, WT wrote: > My understanding is that setting a style is useful when you want to output a > string from a given number or date, not when you want to read in a number or > date from an input string. How would I know ahead of time what style the > strings presented to

Re: NSFormatter troubles (was: NSScanner troubles)

2010-12-11 Thread Stephen J. Butler
On Sat, Dec 11, 2010 at 5:58 PM, WT wrote: > [wrt NSNumberFormatter] However, setUsesGroupingSeparator:YES still has no > effect for me. > > May I send you (off-list) the test project? For those following along at home, this happens to be an iOS project. I did this and it seems to work for me:

Re: NSFormatter troubles (was: NSScanner troubles)

2010-12-11 Thread WT
On Dec 11, 2010, at 9:42 PM, Stephen J. Butler wrote: > On Sat, Dec 11, 2010 at 5:37 PM, WT wrote: >> thanks for replying. I tried it and it gives the exact same results as >> before, that is, the presence of the group separator causes the number >> formatter to return nil. Besides, there remai

Re: NSFormatter troubles (was: NSScanner troubles)

2010-12-11 Thread WT
On Dec 11, 2010, at 9:38 PM, Stephen J. Butler wrote: > On Sat, Dec 11, 2010 at 5:14 PM, WT wrote: >> All results are correct, except for the last two. "123.456,78" should result >> in 123456.78 and 23/04/2010 should result in the appropriate NSDate object >> for April 23, 2010. >> >> The loca

Re: NSFormatter troubles (was: NSScanner troubles)

2010-12-11 Thread Stephen J. Butler
On Sat, Dec 11, 2010 at 5:37 PM, WT wrote: > thanks for replying. I tried it and it gives the exact same results as > before, that is, the presence of the group separator causes the number > formatter to return nil. Besides, there remains the date formatter issue. Forgive me for using FScript,

Re: NSFormatter troubles (was: NSScanner troubles)

2010-12-11 Thread Stephen J. Butler
On Sat, Dec 11, 2010 at 5:14 PM, WT wrote: > All results are correct, except for the last two. "123.456,78" should result > in 123456.78 and 23/04/2010 should result in the appropriate NSDate object > for April 23, 2010. > > The locale is NOT being ignored, since 12,34 and 123456,78 are parsed

Re: NSFormatter troubles (was: NSScanner troubles)

2010-12-11 Thread WT
On Dec 11, 2010, at 9:28 PM, Stephen J. Butler wrote: > On Sat, Dec 11, 2010 at 5:14 PM, WT wrote: >> All results are correct, except for the last two. "123.456,78" should result >> in 123456.78 and 23/04/2010 should result in the appropriate NSDate object >> for April 23, 2010. >> >> The loca

Re: NSFormatter troubles (was: NSScanner troubles)

2010-12-11 Thread Stephen J. Butler
On Sat, Dec 11, 2010 at 5:14 PM, WT wrote: > All results are correct, except for the last two. "123.456,78" should result > in 123456.78 and 23/04/2010 should result in the appropriate NSDate object > for April 23, 2010. > > The locale is NOT being ignored, since 12,34 and 123456,78 are parsed