@:macro function object_owner_dao_get(method:String):Expr {
return macro {
if(object_owner_dao!=null) {
var o:Dynamic=object_owner_dao.$method; //<--
return viewManager.view_get(o,object_viewInfo.viewType,object_viewInfo.data)
}
}
}
Is something like the above possible? I am getting:
s:/_flash/shared_haxe/shared/src/nodion/shared/dao/server/Dao_server_s.hx:226: characters 47-54 : Unexpected $method
I'm also not sure whether one needs to use a string or an expression for method (neither way works as the error has to do with :
object_owner_dao_get("get_withId_sql(id,cache,lock,key)");
object_owner_dao_get(get_withId_sql(id,cache,lock,key));
as specified by:
I made sure that every $-prefix string can be replaced with the
corresponding value, so we a bit more relaxing on the parser we could do
the following :
return macro function(o) return o.$field;
Is the above possible with tink macros? I will be checking that shortly but if anyone knows that would be appreciated :)