Beeblerox / MinimalCompsHX

Haxe port of Keith Peters minimalcomps
61 stars 17 forks source link

Neko target: Solution for HBox/VBox .addEventListener() problem #11

Open cambiata opened 12 years ago

cambiata commented 12 years ago

The addChild() methods of HBox and VBox breaks Neko compilation for me. It seems that the child:Dynamic isn't seen as a EventDispatcher decendant.

I've solved it by replacing the lines

child.addEventListener(Event.RESIZE, onResize);

with

cast(child, nme.events.EventDispatcher).addEventListener(Event.RESIZE, onResize);

After that, the Minimalcompshx.hx compiles fine to Neko, except for the WheelMenu. (There's a problem in the setItem method. Who needs the WheelMenu anyway? :-)

Beeblerox commented 12 years ago

@cambiata Ok, I'll look into this bug. By the way it gave me some idea for better solution of ScrollPane's bug. Thanks for report