On Nov 4, 2009, at 6:14 PM, Paul Hoadley wrote:
On 05/11/2009, at 12:32 PM, Chuck Hill wrote:
On Nov 4, 2009, at 5:35 PM, Paul Hoadley wrote:
On 04/11/2009, at 10:47 PM, Mike Schrag wrote:
try putting your code in finishInitialization() -- that's roughly where migrations run.
On 05/11/2009, at 3:51 AM, Chuck Hill wrote:
Does adding this make any difference?
public void finishInitialization() {
NSBundle.frameworkBundles();
}
I moved the EOF-touching code from didFinishLaunching() to finishInitialization(), and yes it does work. (It also appeared to work when I moved it to LSApplication's constructor (the class between Application and ERXApplication). I assume finishInitialization() is a better place for it, though?)
I would have thought its original place was better.
You mean you would have thought didFinishLaunching() was better?
Yes.
NSNotificationCenter.defaultCenter().addObserver(this, new NSSelector("finishInitialization", ERXConstant.NotificationClassArray), WOApplication.ApplicationWillFinishLaunchingNotification, null);
NSNotificationCenter.defaultCenter().addObserver(this, new NSSelector("didFinishLaunching", ERXConstant.NotificationClassArray), WOApplication.ApplicationDidFinishLaunchingNotification, null);
This is now launching _before_ Migrations. Where you had it originally is _after_ Migrations. And that looks a little too suspicious to be a coincidence. Do you have true for er.migration.migrateAtStartup in your configuration?