Re: Formatting number for leading zeros
Re: Formatting number for leading zeros
- Subject: Re: Formatting number for leading zeros
- From: John Stiles <email@hidden>
- Date: Wed, 11 Jul 2007 13:30:05 -0700
What was wrong with just leaving it without a formatter?
On Jul 11, 2007, at 1:28 PM, development2 wrote:
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:
40blizzard.com
This email sent to email@hidden
_______________________________________________
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