• 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: didUpdate?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: didUpdate?


  • Subject: RE: didUpdate?
  • From: Oscar González <email@hidden>
  • Date: Tue, 31 Jul 2012 09:24:43 -0600
  • Importance: Normal

Hi Theodore,
I use this method, 

this.editingContext().currentEventSnapshotForObject(this)


Saludos,

Oscar.




To: email@hidden
Subject: Re: didUpdate?
From: email@hidden
Date: Mon, 30 Jul 2012 09:18:06 -0400

Hi Theodore,

I agree with George, I wouldn't do the Session way.

Worman set you on the right track. Ok, it didn't fully give you the solution but it pointed you where to look.

The EOEditingContext knows all. It knows what the current values are (just invoke methods on the EO itself) it also knows what the last saved values are (just look at the "snapshot" cache using the EC and the EO).

You see? So that method Worman pointed you to just gave you the new changed values. Ok, but dig under the covers of that method. It's open source right? (unlike Apple's code). Learn how to navigate the snapshot cache. That method must be able to find the old values right? Otherwise how can it pump out the new values of only the modified attributes?

Think of the EC as a "bolus of work." It does everything you were trying to reinvent with your Session plus more. Use the EC to its fullest. It knows past and present at the same time. Nothing else is needed. "willUpdate" is a reasonable place to put the logic you seek, keep it all in the model, and work cleanly with D2W.

Cheers,
-- Aaron

Date: Sun, 29 Jul 2012 07:49:33 -0700
From: George Domurot <email@hidden>
To: Theodore Petrosky <email@hidden>
Cc: "email@hidden" <email@hidden>
Subject: Re: didUpdate?
Message-ID: <email@hidden>
Content-Type: text/plain; charset="utf-8"

For me, I'd say you're going at this the wrong way within the Session..

Keep the session clean.

Check out Paul Yu's recommendation re: ERXGenericRecord and ERXEnterpriseObject.  And, write a controller to manage the object you're editing, do your work, and let it provide you with the appropriate feedback for your email.

-G

_______________________________________________ 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
 _______________________________________________
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: 
 >Re: didUpdate? (From: email@hidden)

  • Prev by Date: Re: need help with rule
  • Next by Date: Get a handle to DisplayGroup From InspectPage
  • Previous by thread: Re: didUpdate?
  • Next by thread: Fixed the WO 5.4.3 2GB file/form upload limitations
  • Index(es):
    • Date
    • Thread