Using WOInject with an intermediate WOApplication subclass
Using WOInject with an intermediate WOApplication subclass
- Subject: Using WOInject with an intermediate WOApplication subclass
- From: Paul Hoadley <email@hidden>
- Date: Fri, 28 Oct 2016 21:23:33 +1030
Hi Henrique (and any other WOInject fans),
I am taking WOInject for a test drive. I have what couldn’t be an uncommon situation: an intermediate, framework-level WOApplication subclass that provides numerous convenience features to the application. The inheritance hierarchy looks like this:
Application → LSApplication → ERXApplication
Since InjectableApplication extends ERXApplication, I figured this would be the way to go:
Application → LSApplication → InjectableApplication → ERXApplication
In Application.main() I call WOInject.init() with the Application class as the String argument, but this fails:
> Cannot initialize the injector. The Application class doesn't extend InjectableApplication.
So I tried LSApplication as the String argument (because it’s the class that does extend InjectableApplication), but this fails with the same Exception.
Is this kind of inheritance hierarchy just not supported by WOInject? That is, does Application itself have to extend InjectableApplication directly?
--
Paul Hoadley
http://logicsquad.net/
_______________________________________________
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