On Apr 22, 2007, at 12:27 PM, Steven Mark McCraw wrote:

Holy crap, people! I finally got the stupid code to work without any hacks! Ok, I'm excited because it's finally working, but things still may be broken all over the place. I haven't tested extensively yet. The problem? NESTING THE EDITING CONTEXT. I'm not kidding. It was a matter of changing

ERXEC.newEditingContext(session.defaultEditingContext())

to

ERXEC.newEditingContext();

And if you're using Project Wonder's automatic locking, there are no problems (that I've found) with needing to lock. Heck, I imagine you could keep an editing context in session like I was doing earlier and lock and unlock in awake/sleep as long as it wasn't nested in the session's default ec (although I have not bothered to verify this yet).

The more I think about it, why would you ever need to use a nested editing context instead of a component level peer editing context?

I use them for Wizard like functionality where I want to verify (validate) the displayed information before allowing the user to move onto the next step. So I have one child EC per step and save the parent (which is usually a peer ec) at the very end.

Chuck

--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects





_______________________________________________
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 [EMAIL PROTECTED]

Reply via email to