Ok,

I'm in a wonder-enabled scenario so how do I use it? Need to call 
setPushChangesDefault(true) somewhere?

rdm

On 11/nov/2009, at 14.38, Anjo Krank wrote:

>>>> Because then the user loses what they typed which can sometimes be 
>>>> annoying (e.g., if it's too long a string etc)
>>> 
>>> As i said: then push the invalid value. This is what ERXValidation does.
>> 
>> And if the value's of the wrong type or can't be coerced?
> 
>            if (eo instanceof EOEnterpriseObject) {
>                // the exception is coming from EREnterpriseObject
>                // WE PUSH THE WRONG VALUE INTO THE EO ANYWAY!
>                if (pushChanges)  {
>                    try {
>                        ((EOEnterpriseObject)eo).takeValueForKeyPath(value, 
> key);
>                    } catch(NSKeyValueCoding.UnknownKeyException  ex) {
>                        // AK: as we could have custom components that have 
> non-existant keys
>                        // we of course can't push a value, so we discard the 
> resulting exception
>                    } catch(Exception ex) {
>                        log.error("Can't push value to key '" + key + "': " + 
> value, ex);
>                    }
>                }
> 
> Cheers, Anjo
> 
> _______________________________________________
> 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/demenna%40rdm-web.com
> 
> This email sent to deme...@rdm-web.com

 _______________________________________________
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 arch...@mail-archive.com

Reply via email to