var manager : Manager<Dynamic> = Reflect.field( Type.resolveClass( tableClassPath ), "manager" ); // this works
var data : List<Dynamic> = Reflect.callMethod( manager, "search", [ true ] ); // php throws error: Unable to call «search»
for( row in data )
{
trace( row.field + "<br/>" );
}
--
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.
Haha I never knew that was possible!
Thnx man you saved my day! :)
Yep, "search" is a macro, so doesn't actually exist in your generated PHP code, hence you can't use it via Reflect.
"dynamicSearch" is a normal function, so is available.
If you use search() normally, (that is, not using Reflect), you'll find that it actually gets replaced (I think with dynamicSearch) in your php code. Worth taking a look at sometime :)