1 Reply Latest reply on Oct 23, 2009 6:13 AM by TodLoch

    How to return value from module using interface's method?

    TodLoch Level 1


      I have a module implements IRiskInterface (my own interface, which has delcared function calculatePayment(param:Object):Number)


      In my application I try to get a value calculated after the module is loaded in this way:







      public function rdModul(e:ModuleEvent): void


          var ml:ModuleLoader = e.currentTarget as ModuleLoader;


          if (ml.child != null)


                var ichild:* = ml.child as IRiskInterface;

                var params:Object = new Object();

                params["pol54_suma"] = "300000";

                params["pol54_id"] = "120";


                var skl:String = ichild.calculatePayment(params).toString;







      The problem is, that I receive output "function Function 90 {}", not calculated payment :-( I checked, that inside the module's function the payment is correctly calculated, but it isn't pass to "skl" variable.


      Could anyone explain this for me, please?