or Create a profile
Robotlegs 1 →
05 Nov, 2010 05:33 PM
i follow 2-3 examples so far so good but i just can't find how to send vo data directly from service to model
it would be "05a" refer to this diagram http://www.robotlegs.org/diagram/
2 Posted by Stray on 05 Nov, 2010 05:42 PM
no worries, just inject your model into your service and populate it direct.
Eg - in your context startup:
and in your service
public var someModel:ISomeModel
then you can use the someModel variable directly in the service. Best to use an interface for your model so that you don't couple it together too tightly.
Hope that helps - ask more if you need to,
3 Posted by katopz on 06 Nov, 2010 12:23 PM
thx for reply, it's working now :)
btw, this service -> model instruction should be write in docs somewhere?
just curious that maybe i skip reading it...
4 Posted by Thomas Gillis on 17 Nov, 2010 01:22 PM
I'm having a similar issue but mine is the model is null when I inject in into my service.
This is my context:
Then in the constructor I try to access the injected GameModel. Should I override a function my service what extends actor like the onRegister() in a Mediator?
5 Posted by Shaun Smith on 17 Nov, 2010 10:44 PM
6 Posted by Thomas Gillis on 17 Nov, 2010 11:58 PM
Thank you Mr.Smith for helping this poor noob solve his problem! Worked like a charm and the page has been bookmarked for future reference :)
Stray closed this discussion
on 13 Feb, 2011 03:14 PM.
Comments are currently closed for this discussion.
You can start a new one.
4 people watching.
No more actions from Robotlegs or the discussion starter are required.
This discussion is private.
Only you and Robotlegs support staff can see and reply to it.
This discussion is public. Everyone can see and reply to it.
Powered by Tender™.