Validating a percentage?

2007-09-19 Thread James Cicenia
Hello - I am trying to use the EO validation frameworks and am a bit confused. I would like a person to be able to enter either a number, or a percent with the percent sign. But then I need to strip this out. Do I have to create a string instance variable or can I somehow use

Re: Validating a percentage?

2007-09-19 Thread Daniele Corti
2007/9/19, James Cicenia [EMAIL PROTECTED]: Hello - I am trying to use the EO validation frameworks and am a bit confused. I would like a person to be able to enter either a number, or a percent with the percent sign. But then I need to strip this out. Do I have to create a string

Re: Validating a percentage?

2007-09-19 Thread Ken Anderson
James, Personally, I would put a string in my component, and convert the value to a number and set it in the EO at an appropriate time. Ken On Sep 19, 2007, at 9:47 AM, James Cicenia wrote: Hello - I am trying to use the EO validation frameworks and am a bit confused. I would like a

Re: Validating a percentage?

2007-09-19 Thread James Cicenia
Yes, that is what I wound up doing. But, I am trying to learn more and more of the WO way, and something I have not used was the validationKEY stuff. So I figured this might be a good place to learn it. I guess next time. JAmes On Sep 19, 2007, at 9:05 AM, Ken Anderson wrote: James,

Re: Validating a percentage?

2007-09-19 Thread Daniele Corti
2007/9/19, James Cicenia [EMAIL PROTECTED]: Yes, that is what I wound up doing. But, I am trying to learn more and more of the WO way, and something I have not used was the validationKEY stuff. do you mean the validateValueForKey of NSValidation class? So I figured this might be a good

Re: Validating a percentage?

2007-09-19 Thread Ray Kiddy
On Sep 19, 2007, at 7:23 AM, Daniele Corti wrote: 2007/9/19, James Cicenia [EMAIL PROTECTED]: Yes, that is what I wound up doing. But, I am trying to learn more and more of the WO way, and something I have not used was the validationKEY stuff. do you mean the validateValueForKey of

Re: Validating a percentage?

2007-09-19 Thread David LeBer
On 19-Sep-07, at 10:48 AM, Chuck Hill wrote: On Sep 19, 2007, at 6:47 AM, James Cicenia wrote: Hello - I am trying to use the EO validation frameworks and am a bit confused. I would like a person to be able to enter either a number, or a percent with the percent sign. But then I need

Re: Validating a percentage?

2007-09-19 Thread Pierre Bernard
110% agree Validation is business logic. Belongs into your EO. Accepting a string that is either a number or a number with a suffix character is string parsing. A job for a formatter. Pierre Bernard Houdah Software s.à r.l. On Sep 19, 2007, at 4:48 PM, Chuck Hill wrote: On Sep 19, 2007,

Re: Validating a percentage?

2007-09-19 Thread Chuck Hill
On Sep 19, 2007, at 1:56 PM, James Cicenia wrote: Hmm, I will have to investigate this custom formatter. I thought they were for display only. Most certainly not! Custom formatters are a very useful tool that should be in everyone's toolbox. I use them for more than just display