• 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: Programmatically loading new models in a new EOModelGroup
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Programmatically loading new models in a new EOModelGroup


  • Subject: Re: Programmatically loading new models in a new EOModelGroup
  • From: David Avendasora <email@hidden>
  • Date: Mon, 24 Feb 2014 16:32:01 -0500

Hey Larry,

You could try adding a subclass of ERXFrameworkPrincipal to your model framework. It will get loaded even before the Application constructor so I think you could do all your model swizzeling there.


From ERXExtensions.java (in, shockingly, ERXExtensions):

/**
 * Principal class of the ERExtensions framework. This class
 * will be loaded at runtime when the ERExtensions bundle is
 * loaded (even before the Application constructor is called)
 * This class has a boat-load of stuff in it that will hopefully
 * be finding better homes in the future. This class serves as
 * the initialization point of this framework, look in the static
 * initializer to see all the stuff that is initially setup when
 * this class is loaded. This class also has a boat load of
 * string, array and EOF utilities as well as the factory methods
 * for creating editing contexts with the default delegates set.
 */
public class ERXExtensions extends ERXFrameworkPrincipal {


Good luck!

Dave

On Feb 24, 2014, at 12:31 PM, Laurence Mills-Gahl <email@hidden> wrote:

Aaron,

I think that per-model properties should work well in this case so you don’t need to put connection dictionary information in the model itself. 

On the topic of automatic loading during launch, I also am separating model groups for using separate OSCs and wonder if there is a better way to deal with this than what I’m doing now.

I would like to keep models in standard location (Resources) so it’s easier to deal with when I forget why I moved them out of the way in the first place. 

At the moment, I’m removing models from the default group in the application constructor and creating the other groups I need there. I’m uncomfortable with this design because it feels like the model groups should be managed in the model framework and not the application project… although that gets a bit tortured also.

Any thoughts?


Larry Mills-Gahl
email@hidden






—————————————————————————————
WebObjects - so easy that even Dave Avendasora can do it!™
—————————————————————————————
David Avendasora
Senior Software Abuser
Nekesto, Inc.





 _______________________________________________
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: 
 >Programmatically loading new models in a new EOModelGroup (From: David Avendasora <email@hidden>)
 >Re: Programmatically loading new models in a new EOModelGroup (From: Aaron Rosenzweig <email@hidden>)

  • Prev by Date: Re: Proper way to close AMD so the Browser does not Prompt Leave Page?
  • Next by Date: Ponder docs or examples
  • Previous by thread: Re: Programmatically loading new models in a new EOModelGroup
  • Next by thread: Re: Programmatically loading new models in a new EOModelGroup
  • Index(es):
    • Date
    • Thread