Hi!

Ok, tried takeValueForKey on setAddress and obviously got a stack overflow (takeValueForKey actually calls setAddress!).

Is there any decent way to make a setter that DOES validation (ie, without having to do takeStoredValueForKey( validateXPTO(value), "XPTO" )?

  Yours

Miguel Arroz

On 2006/08/22, at 19:00, Miguel Arroz wrote:

Hi!

  I'm using EOGenerator to generate my classes from the model.

Today, I found out that EOGenerator generates accessors using the trusted key/value operations, like:

    public String address() {
        return (String)storedValueForKey("address");
    }

    public void setAddress(String aValue) {
        takeStoredValueForKey(aValue, "address");
    }

This causes that, when I use setAddress(address), the value does not go trough the validateAddress method.

This looks strange, but I suppose there are any reasons why EOGenerator authors prefered the trusted operators instead of the normal "takeValueForKey" ones. Anyone knows why? Is there a problem if I change the templates to use the normal operators?

  Yours

Miguel Arroz

"The world lies in the hands of evil
 And we pray it would last" -- Apocalyptica, Life Burns!

Miguel Arroz
http://www.ipragma.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/arroz% 40guiamac.com

This email sent to [EMAIL PROTECTED]


"We have no sympathy for the lost souls
We've chosen the path of disgrace
We give this life to our children
And teach them to hate this place" -- Apocalyptica, Life Burns!

Miguel Arroz
http://www.ipragma.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 archive@mail-archive.com

Reply via email to