Re: ERXEC.newEditingContext() access
Re: ERXEC.newEditingContext() access
- Subject: Re: ERXEC.newEditingContext() access
- From: Paul Hoadley <email@hidden>
- Date: Tue, 6 Jan 2009 17:50:52 +1030
On 02/01/2009, at 12:03 PM, Theodore Petrosky wrote:
ok... I am experimenting with the ajax examples and I added the
UpdateDisplayGroup to my app (with alterations). I am populating the
list with a db query:
categoryList =
Category.fetchAllCategories(ERXEC.newEditingContext(), sortOrderings);
EOEditingContext ec = ERXEC.newEditingContext();
categoryList = Category.fetchAllCategories(ec, sortOrderings);
then:
dg = new WODisplayGroup();
dg.setObjectArray(categoryList);
dg.setNumberOfObjectsPerBatch(20);
I want to access the editingContext and save the changes from the
save dialog. What I want is something like this in the save function:
dg.selectedObject().editingContext().saveChanges();
ec.saveChanges();
I am at a loss as to how to access the editingContext when I use
ERXEC.newEditingContext().
Assigning it to a local variable will certainly give you access to the
EC you're passing to fetchAllCategories() above. Does that solve your
problem?
--
Paul.
w http://logicsquad.net/
h http://paul.hoadley.name/
_______________________________________________
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