Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Detecting eo changes when they happen



On Oct 10, 2006, at 3:09 PM, Florijan Stamenkovic wrote:

How about overriding all takeValue...() methods? Would that be inadvisable?

That's one way. You could check that the key you were getting was actually an attribute of the EO too if you wanted. Also keep in mind that EOF uses take*Stored*Value...() when it initializes your objects (and at some other times too -- see next), so you might want to do something with that too.


Another way to do it would be to change your eogenerator (I assume you're using it or something similar) template to generate code like this:

    public void setMyAttribute(Object value)
    {
        takeStoredValueForKey(value, "myAttribute");
        didChange("myAttribute", value);
    }

Of course, you'll need a common superclass that implements didChange however you like.


sacha


-- Sacha Michel Mallais Knowledge Broker Global Village Consulting Inc. http://www.global-village.net/ PGP Key ID: 7D757B65 AIM: smallais -----BEGIN GEEK CODE BLOCK----- Version: 3.12 GCS d- s++:++ a C++(++++)$ UB@+++(++++)$ P-(---) L+(-) E>++ W++(+++) N+ o? K? w(---) O M++ V-(--) PS+++ PE(-) Y+ PGP++ t+ 5+ X+ R+>+++ tv+ b+ DI+++ D++ G e++ h(+) r* y+(*) ------END GEEK CODE BLOCK------



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/email@hidden

This email sent to email@hidden
References: 
 >Detecting eo changes when they happen (From: Florijan Stamenkovic <email@hidden>)
 >Re: Detecting eo changes when they happen (From: Chuck Hill <email@hidden>)
 >Re: Detecting eo changes when they happen (From: Florijan Stamenkovic <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.