DoclerLabs / hexMachina

Releases, issues, documentation, website of hexMachina, framework written in Haxe
http://hexmachina.org
MIT License
44 stars 8 forks source link

Method Forwarder #198

Closed FrancisBourre closed 7 years ago

FrancisBourre commented 7 years ago

This metadata allows to forward the method call to any member of the class.

@Forward( filterModel.setFilter )       public function setFilter( filter : Filter ) : Void { }
@Forward( model.startItemEdition )      public function editItem( id : String ) : Void {}
@Forward( model.removeItem )            public function removeItem( id : String ) : Void {}

To allow that, you just need to implement IForwarder