• 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
Core data - binding related problem in NSNumberFormatter and NSDatePicker
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Core data - binding related problem in NSNumberFormatter and NSDatePicker


  • Subject: Core data - binding related problem in NSNumberFormatter and NSDatePicker
  • From: Devarshi Kulshreshtha <email@hidden>
  • Date: Thu, 16 Dec 2010 16:08:05 +0530

Hi Pat,

Regarding:

For #1, you have an non-ascii character at the front of the number formatter
> (in IB).


It is now working correctly when I am entering the price with $ symbol
prefixed, eg. $123,00 :)

I think that this is not user intuitive, user may not always know that he/
she has to prefix dollar symbol. I think it would have been good if:

1. I can somehow change the alert message which now says - "Formatting
Error" to "You should prefix dollar symbol".

2. Numberformatter can automatically prefix the '$' symbol to the entered
decimal number.

Do you know any way to implement these?

 For #2, you are only actually setting the value of the selected car.
>  However the value of the date (if you don't purposefully set it) is nil,
> and the Date Picker is not displaying a value for nil, so it is leaving the
> value in there.  Try adding two cars, and setting a value for each car.
>  Then it will change for each selection.  I discovered this by adding a text
> field, setting a date formatter on the text field, and binding the text
> field to the same binding as the date picker.


Your interpretation is correct, when I set the default value of
datePurchased attribute to some value say- 2010-12-10 in
MyDocument.xcdatamodel, it started working as intended.

So I am now thinking that can we set the default value to today's date in
xcdatamodel?

Also when I tried adding two or more cars and change their data value, I got
the same problem. I used date-picker according to my requirements.

--
Thanks,

Devarshi



--
Thanks,

Devarshi
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Core data - binding related problem in NSNumberFormatter and NSDatePicker
      • From: Andreas Grosam <email@hidden>
References: 
 >Core data - binding related problem in NSNumberFormatter and NSDatePicker (From: Devarshi Kulshreshtha <email@hidden>)

  • Prev by Date: Re: Build and Archive fails due to missing dSYM file
  • Next by Date: Re: Re: How to read a text file over a network
  • Previous by thread: Core data - binding related problem in NSNumberFormatter and NSDatePicker
  • Next by thread: Re: Core data - binding related problem in NSNumberFormatter and NSDatePicker
  • Index(es):
    • Date
    • Thread