or Create a profile
10 Jun, 2012 12:31 PM
I am not able to get, how exactly to access a model inside command.
If i remember correctly, in previous mvc pattern i followed there
was a direct access to model available inside the command. I tried
to inject model inside the command to access it :p , and it showed
I went through the example kanban application. There i can see a
service is created ( StubStatusService ) that extends Actor . The
model is injected there, and thus accessible. Is this the way
should i follow. Or is their some other shortcut ?
2 Posted by Stray on 10 Jun, 2012 12:41 PM
you should be able to inject the model inside the command.
1) Did you make the variable public?
public var someModel:SomeModel;
The injector can't inspect private / protected members.
2) Did you definitely have your
All of these will fail:
[Inject]; (Putting a semi-colon between the tag and the `public var` declaration breaks the association).
Also - I assume the command is being triggered by an event on the command map? If you just new() something up then it won't have any injections fulfilled.
3 Posted by vishwas.gagrani on 27 Jun, 2012 01:39 PM
I used "private" specifer. Replacing it with public solved the
Ondina D.F. closed this discussion
on 28 Jun, 2012 09:16 AM.
Comments are currently closed for this discussion.
You can start a new one.
2 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™.