Context error 1136: Incorrect Number of Arguments. Expected 0?
I have a Flash Professional project that I am attempting to use Robotlegs 1.0.3 with. When I instantiate the context, however, I get the error that there is an incorrect number of arguments, and that the expected number is 0. Why is that?
The same SWCs work fine when used with MXML.
I have created the project in Flash Builder 4.
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
1 Posted by Jason Dias on 29 Mar, 2010 08:42 AM
What parameters are you passing when creating the context? Make sure your context is extending Context.
Can you post any code snippets?
2 Posted by ndcollins on 29 Mar, 2010 01:41 PM
I am extending Context, and my Main.as looks like the following:
Support Staff 3 Posted by Shaun Smith on 29 Mar, 2010 04:20 PM
The Flash Professional compiler strips out metadata needed for Robotlegs to function correctly. There are some workarounds. SwiftSuspenders can use an XML definition for the predefined Robotlegs MVCS dependencies. Any custom dependencies need to either be defined for constructor injection, or included in the XML map (passed through to the context). There's an article with some more info over here:
http://www.helmutgranda.com/2009/12/02/robotlegs-and-flash-ide-cs4-...
Support Staff 4 Posted by Shaun Smith on 29 Mar, 2010 04:22 PM
Apologies, I messed up my first response (edited now).
Stray closed this discussion on 16 Feb, 2011 09:04 PM.