• 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: EOEditingContext in Application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EOEditingContext in Application


  • Subject: Re: EOEditingContext in Application
  • From: Lachlan Deck <email@hidden>
  • Date: Tue, 1 Jul 2008 14:05:21 +1000

On 01/07/2008, at 1:25 PM, Drew Thoeni wrote:

I'm not even sure I know enough to ask this question correctly, but here goes.
I'm trying to make an application more efficient by moving the code table lists from the session to the application.


To do so, though, I need an editing context to hold the lists. But, I can't use the defaultEditingContext as I don't have a session upon application start.
So, I (wrongly, it seems) created an editing context in the application.

Nothing wrong with that per se. But what you want is a better api so as to treat them like read-mostly data.


Clearly because I have two editing contexts and the session one (defaultEditingContext) can't see the objects in the one shown below (appEC).

So, if I want to make efficient use of memory by storing these rarely changing code table lists in the application, how does one go about storing them in an EC that the sessions can get to?

Two options:

1) EOSharedEditingContext.

2) localize your eos

public NSArray<Language> languageList(EOEditingContext ec) {
NSArray results = EOUtilities.objectsWithFetchSpecificationAndBindings( appEC, "Language", "FetchAllAvailableLanguages", null );
return EOUtilities.localInstancesOfObjects(ec, results);
}


with regards,
--

Lachlan Deck

_______________________________________________
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: 
 >EOEditingContext in Application (From: Drew Thoeni <email@hidden>)

  • Prev by Date: Re: EOEditingContext in Application
  • Previous by thread: Re: EOEditingContext in Application
  • Index(es):
    • Date
    • Thread