tag:robotlegs.tenderapp.com,2009-10-18:/discussions/robotlegs-2/33-rl2-migration-extensionRobotlegs: Discussion 2012-08-27T10:37:12Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/150300572012-04-05T11:49:08Z2012-04-05T11:49:08ZRL2 Migration extension<div><p>Hi Paul,</p>
<p>I managed to make the Mediators work by using<br>
[PostConstruct] override public function onRegister():void</p>
<p>and the rl2 mediatorMap for the mappings, since the idea is to
migrate from rl1 to rl2.<br>
Hopefully I’m not mistaken about the usage of this
MigrationExtension.</p>
<p>In SimpleConfig</p>
<pre>
<code>
import robotlegs.bender.extensions.mediatorMap.api.IMediatorMap;
[PostConstruct]
public function startup():void
{
…
mediatorMap=injector.getInstance(IMediatorMap);
//mediatorMap.mapView(ButtonContainer, ButtonContainerMediator);
//mediatorMap.mapView(TextContainer, TextContainerMediator);
mediatorMap.mapView(TextContainer).toMediator(TextContainerMediator);
mediatorMap.mapView(ButtonContainer).toMediator(ButtonContainerMediator);
…</code>
</pre>
<p>TextContainerMediator</p>
<pre>
<code>
import org.robotlegs.mvcs.Mediator;
[PostConstruct]
override public function onRegister():void
{
trace("TextContainerMediator.onRegister()");
addContextListener(SimpleModelEvent.FILE_NAME_CHANGE, onFileNameChange, SimpleModelEvent);
addContextListener(SimpleModelEvent.FILE_PATH_CHANGE, onFilePathChange, SimpleModelEvent);
}</code>
</pre>
<p>Ondina</p></div>Ondina D.F.tag:robotlegs.tenderapp.com,2009-10-18:Comment/150300572012-04-05T11:52:14Z2012-04-05T11:52:14ZRL2 Migration extension<div><p>Hey Paul,</p>
<p>the migration extension is currently very much work in progress.
In<br>
fact, I extended its functionality exactly as far as I needed for
the<br>
Cafe Townsend example to work before my FITC Amsterdam talk a
few<br>
weeks ago.</p>
<p>That being said, the MediatorMap is also pretty rough still, so
that<br>
might also be the reason. I think I might remember
<code>onRegister()</code> not<br>
being wired up at all, so you could try adding
<code>[PostConstruct]</code><br>
metadata to that and see if it gets fired then.</p>
<p>cheers,<br>
till</p></div>Till Schneidereittag:robotlegs.tenderapp.com,2009-10-18:Comment/150300572012-04-05T12:13:57Z2012-04-05T12:13:57ZRL2 Migration extension<div><p>Hi Paul,</p>
<p>Thanks for the sample app - it helped me track down the issue.
You'll need to grab the latest framework and extension code, and
that should sort you out (no changes to the sample app
required).</p></div>Shaun Smithtag:robotlegs.tenderapp.com,2009-10-18:Comment/150300572012-04-05T18:54:49Z2012-04-05T18:54:49ZRL2 Migration extension<div><p>Thanks to all of you for the quick responses. I'll pull down the
latest<br>
version of the extension and give it a try this evening.</p>
<p>Paul</p></div>Paul Robertson