• 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
Re: Formatting number for leading zeros
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Formatting number for leading zeros


  • Subject: Re: Formatting number for leading zeros
  • From: development2 <email@hidden>
  • Date: Wed, 11 Jul 2007 14:28:09 -0600

Thanks, yes I know that, and that what I have already done. But the problem with this is if I set it to use the Format positive: 00000 and negative: -00000, and the user types in say 99, after they hit return it shows as 00099, I don't want that unless the user actually puts in the leading zeros. If they do not put in the leading zeros then I want it to show 99 like they typed in, but if they do type in the leading zeros, however many they type in, I want to keep that for them. I need to keep the format that they type in. So after looking at this I guess I will have to write my own formatter for this problem.

Thanks.

On Jul 11, 2007, at 12:26 PM, I. Savant wrote:

On 7/11/07, development2 <email@hidden> wrote:
I hope someone can help me. I have a preference field that allows
users to enter a starting range number, now they need to be able to
start numbers at say 000001 or -000001 for example. Now I can do this
in the preference field because right now it is a string. If I add a
number formatter to it, the next time it is displayed it displays as
either 1 or -1. Is there anyway to set this up so it keeps the
leading zeros?

You can set this in the Formatter's properties in IB.

 If you have the inspector palette open in IB when you drag the
formatter into your text field, it automatically selects the
""Formatter" inspector page. Alternatively you can click the text
field, then drop down the inspector panel's popup and select it
yourself ...

--
I.S.


_______________________________________________

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: Formatting number for leading zeros
      • From: John Stiles <email@hidden>
References: 
 >Formatting number for leading zeros (From: development2 <email@hidden>)
 >Re: Formatting number for leading zeros (From: "I. Savant" <email@hidden>)

  • Prev by Date: Re: How to keep creation/modification date of a (Core Data) object?
  • Next by Date: Re: Formatting number for leading zeros
  • Previous by thread: Re: Formatting number for leading zeros
  • Next by thread: Re: Formatting number for leading zeros
  • Index(es):
    • Date
    • Thread