• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: EOGenerator and takeStoredValueForKey dumb question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EOGenerator and takeStoredValueForKey dumb question


  • Subject: Re: EOGenerator and takeStoredValueForKey dumb question
  • From: Miguel Arroz <email@hidden>
  • Date: Tue, 22 Aug 2006 19:18:51 +0100

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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
40guiamac.com


This email sent to email@hidden


"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 (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >EOGenerator and takeStoredValueForKey dumb question (From: Miguel Arroz <email@hidden>)

  • Prev by Date: Why we should try!?
  • Next by Date: Re: WebObjects Foundation [ Why we should try!?]
  • Previous by thread: EOGenerator and takeStoredValueForKey dumb question
  • Next by thread: Re: EOGenerator and takeStoredValueForKey dumb question
  • Index(es):
    • Date
    • Thread