tag:robotlegs.tenderapp.com,2009-10-18:/discussions/problems/70-context-error-1136-incorrect-number-of-arguments-expected-0Robotlegs: Discussion 2013-04-28T10:02:19Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/13307832010-03-29T08:42:52Z2010-03-29T08:42:54ZContext error 1136: Incorrect Number of Arguments. Expected 0?<div><p>What parameters are you passing when creating the context? Make
sure your context is extending Context.</p>
<p>Can you post any code snippets?</p></div>Jason Diastag:robotlegs.tenderapp.com,2009-10-18:Comment/13307832010-03-29T13:41:23Z2010-03-29T13:41:23ZContext error 1136: Incorrect Number of Arguments. Expected 0?<div><p>I am extending Context, and my Main.as looks like the
following:</p>
<pre>
<code>package
{
import com.navteq.app.AppContext;
import flash.display.Sprite;
public class Main extends Sprite {
protected var context:AppContext;
public function Main() {
context = new AppContext( this );
}
}
}</code>
</pre></div>ndcollinstag:robotlegs.tenderapp.com,2009-10-18:Comment/13307832010-03-29T16:20:04Z2010-03-29T16:22:02ZContext error 1136: Incorrect Number of Arguments. Expected 0?<div><p>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:</p>
<p><a href=
"http://www.helmutgranda.com/2009/12/02/robotlegs-and-flash-ide-cs4-injection/">
http://www.helmutgranda.com/2009/12/02/robotlegs-and-flash-ide-cs4-...</a></p></div>Shaun Smithtag:robotlegs.tenderapp.com,2009-10-18:Comment/13307832010-03-29T16:22:46Z2010-03-29T16:22:57ZContext error 1136: Incorrect Number of Arguments. Expected 0?<div><p>Apologies, I messed up my first response (edited now).</p></div>Shaun Smith