[haXe] Passing functions as parameters query
Firdosh Tangri
ftangri at gmail.com
Mon Apr 3 05:27:27 CEST 2006
hey ,
I am having some trouble figuring out how to pass functions as
parameters
import flash.Lib;
class TestB4 {
public function new(){
trace("Hello Beta 4");
printTest1(printTest2());
}
private function printTest1(func:Void->Void):Void{
trace("printTest 1");
}
private function printTest2():Void{
trace("printTest 2");
}
public static function main():Void{
new TestB4();
}
}
This is the compiler error
TestB4.hx:7: : characters 24-36 Void should be Void -> Void
For function argument 'func'
thanks
cheers :)
firdosh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.motion-twin.com/pipermail/haxe/attachments/20060402/6280fd19/attachment.htm
More information about the Haxe
mailing list