tag:robotlegs.tenderapp.com,2009-10-18:/discussions/questions/978-accessing-the-event-parameters-inside-the-command-mapped-by-that-eventRobotlegs: Discussion 2012-08-25T14:41:44Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/176718892012-07-28T18:26:06Z2012-07-28T18:26:06Zaccessing the event parameters inside the Command mapped by that event. <div><p>inject the event into the command.</p>
<p>in your ConfigureDatabaseCommand:</p>
<pre>
<code>[Inject]
public var event:Event
public function execute():void{
const e:ConfigureDatabaseEvent = event as ConfigureDatabaseEvent
}</code>
</pre>
<p>OR event better:</p>
<p>add the Event Class reference to the command mapping</p>
<pre>
<code> commandMap.mapEvent(ConfigureDatabaseEvent.CONFIGURE, ConfigureDatabaseCommand, e:ConfigureDatabaseEvent );</code>
</pre>
<p>and in your command:</p>
<pre>
<code>[Inject]
public var e:ConfigureDatabaseEvent
public function execute():void{
}</code>
</pre></div>neil