is (service and model) like (view and mediator) in RL2?
if I want to use MVC+S,Am I must create a service class and dispatch some events to Model like view dispatch event to Mediator?
is RL2 has some interface like 'Actor' in RL1?
thx.
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Ondina D.F. on 04 May, 2013 09:00 AM
Hello yellow,
No, there is no Actor.as in rl2.
You have 2 options:
Inject the shared event dispatcher into your Models and Services like this:
[Inject]
public var dispatcher:IEventDispatcher;
create your own base class, inject the dispatcher, and let your classes that need the shared event dispatcher extend it. Look at rl1’ Actor.as for inspiration:
https://github.com/robotlegs/robotlegs-framework/blob/version1/src/...
http://knowledge.robotlegs.org/kb/reference-mvcs-implementation/do-...
hth
Ondina
2 Posted by yellow.as on 04 May, 2013 09:43 AM
thanks,
I think I know how to use it now.
Support Staff 3 Posted by Ondina D.F. on 04 May, 2013 11:27 AM
No problem:)
Ondina D.F. closed this discussion on 04 May, 2013 11:27 AM.