this.mediatorMap.mapView(DisplayView, DisplayMediator);
--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
To unsubscribe from this group and stop receiving emails from it, send an email to haxelang+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
public class ClockViewMediator extends Mediator { [Inject] // Injection using [Inject] metatag private var clockView:ClockView; public function ClockViewMediator() { super(); } }
This is how views are injected in mediators in Robotlegs:
mediatorMap.mapView(MyView, MyViewMediator);Once you have added your view on the display list.Trigger//AppViewviewAdded(myView) // this sits in the main application view after an addedtostage event for exampleAnd then in your mediator:Class MyViewMediatoroverride function onRegister //this function is called after view addedtrace(this.view)See the view is automatically injected as var view.Voilà.As i m coding myself an Mmvc app, i feel there is so much imports needed ,you have to write a lot ,even for a simple application.You have to be very specific in the namming of your signals and command.I wish i had import package withimport my.package.signals.*Like haxe 3 will permit. But for now it is not supported.Good luck
//AppView
viewAdded(myView) // this sits in the main application view after an addedtostage event for example
How is the AppView supposed to recognize an instance of another view? (I guess it's somehow handled by the framework...)
If you could wire up a super-simple working example of this, I would be happy!
How is the AppView supposed to recognize an instance of another view?
Mediator instances are created automatically when the IViewContainer (generally an ApplicationView) calls the added handler.
Generally a base view class will handle bubbling of added and removed events from the target platform's display heirachy.
See the examples for a reference implementation.
To manually do this call the handler directly
applicationView.added(viewInstance);
Le jeudi 31 janvier 2013 à 15:56, Cambiata a écrit :
(Sorry, posted unfinished by accident)
I'm adding the DisplayView to the stage in the Main like this:
https://github.com/cambiata/mmvc-simple-clock/blob/master/src/Main.hx#L36
So, obviously this isn't enough to get the DisplayView/DisplayViewMediator going...
Sorry for being slow, but I'm just trying to follow the principles from Robotlegs, as far as I know them.
--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
To unsubscribe from this group and stop receiving emails from it, send an email to haxelang+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
To unsubscribe from this group and stop receiving emails from it, send an email to haxelang+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
E-Mail ist virenfrei.
Von AVG überprüft - www.avg.de
Version: 2013.0.2890 / Virendatenbank: 2638/6026 - Ausgabedatum: 11.01.2013
Die Virendatenbank sind veraltet.
--
BTW i'am postite
--
As you seem to try every Haxe mvc Framework on the planet.. ( which is a good initiative )
did you try this port of backbone ?
did you try this port of backbone ?
/ J
--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
To unsubscribe from this group and stop receiving emails from it, send an email to haxelang+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
E-Mail ist virenfrei.
Von AVG überprüft - www.avg.de
Version: 2013.0.2897 / Virendatenbank: 2639/6072 - Ausgabedatum: 31.01.2013
--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
To unsubscribe from this group and stop receiving emails from it, send an email to haxelang+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
E-Mail ist virenfrei.
Von AVG überprüft - www.avg.de
I guess that the clipping stems from a not fully fine-tuned bounds calculation in the nme jeash engine...
To hack around that, add this line in the beginning of the .createClock() method:
this.clockFace.graphics.drawRect( -this.radius - 4, -this.radius - 4, 10, 10);
It will draw a small rectangle just above the top and just to the left of the circle, thus expanding the bounds so that the circle won't be clipped...