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 NSValidation class?
So I figured this might
be a good place to learn it.
I guess next time.
JAmes
The question of where to validate a value almost always ends up
becoming an MVC issue, just as with most of the rest of WO.
You want to validate something.
Do you want to validate how it looks? Then that should be done in the
WOComponent, or even in js in the browser. Do you want to validate
what something is? That is a model problem and should be done closer
to the Model layer.
It may seem convenient to do a model check in the UI, but it does not
scale and ends up causing other problems. It is better to validate in
the right place and use exception propagation to get info about
problems to the right place. I almost always separate data into a
framework, as I usually have more than one app for a model. This
tends to force the issue.
- ray
On Sep 19, 2007, at 9:05 AM, Ken Anderson wrote:
> 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 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 validatePercentLoad in the EO?
>>
>> Thanks,
>> James Cicenia
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list (Webobjects-dev@lists.apple.com)
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/webobjects-dev/kenlists%
>> 40anderhome.com
>>
>> This email sent to [EMAIL PROTECTED]
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (Webobjects-dev@lists.apple.com )
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/ildenae%
40gmail.com
This email sent to [EMAIL PROTECTED]
--
Daniele Corti
AIM: S0CR4TE5
Messenger: [EMAIL PROTECTED]
--
Computers are like air conditioners -- they stop working properly
if you open
WINDOWS
--
What about the four lusers of the apocalypse? I nominate:
"advertising", "can't log in", "power switch" and "what backup?"
--Alistair Young
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/ray%
40ganymede.org
This email sent to [EMAIL PROTECTED]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]