how can i switch 2 mediators via 1 view?
i'm try to unmap BMediator from BaseView and then map AMediator
to BaseView, easy as that
i know it's kinda bad practice here (as i read), but i just curios
that why it just didn't work an gave me error instead
i do follow
http://knowledge.robotlegs.org/discussions/questions/50-best-place-...
but i get Error: Injector is missing a rule to handle injection
into target [object AMediator]. Target dependency: BaseView
eventually after this line
// Instantiate a new mediator and satisfy its dependencies mediatorMap.createMediator(view);
even remap same old BMediator to BaseView didn't seem to work (same error)
please see attach for src, fyi i use robotlegs 1.4.0,
SwiftSuspenders v1.5.1
any help would be appreciate, i can't sleep well for 2 days for
this, it keep running in my head ;o
- TestUnmap.rar 138.2 KB
Comments are currently closed for this discussion. You can start a new one.
Support Staff 2 Posted by Till Schneidereit on 18 Feb, 2011 09:23 AM
One quick question, without having looked at the source:
Are the views you're mapping to extending BaseView or are you really
mapping to BaseView itself?
If the former, you need to change your `mapView` invocation and add
the parameter `injectViewAs`:
mediatorMap.mapView(AView, AMediator, BaseView); // assuming you want
to map a view called `AView`
If that's completely off the mark, then please say so and I will have
a look at the sources.
3 Posted by katopz on 18 Feb, 2011 09:49 AM
Thx, for reply, actually it's not extend BaseView there it's just SomeView
Sorry if that class name seem to be confuse, I do plan for testing that AView things really later (obviously after this simple 1 view work)
Support Staff 4 Posted by Till Schneidereit on 18 Feb, 2011 09:55 AM
Ok, I'll have a look at the source and get back to you then.
Stray closed this discussion on 29 Apr, 2011 06:22 PM.