diff --git a/include/chaiscript/language/chaiscript_eval.hpp b/include/chaiscript/language/chaiscript_eval.hpp index bd2ee1ae..502b6b13 100644 --- a/include/chaiscript/language/chaiscript_eval.hpp +++ b/include/chaiscript/language/chaiscript_eval.hpp @@ -1147,8 +1147,19 @@ namespace chaiscript virtual ~Attr_Decl_AST_Node() {} virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss){ try { - t_ss.add(fun(boost::function(boost::bind(&dispatch::detail::Dynamic_Object_Attribute::func, this->children[0]->text, - this->children[1]->text, _1))), this->children[1]->text); + + t_ss.add(Proxy_Function + (new dispatch::detail::Dynamic_Object_Function( + this->children[0]->text, + fun(boost::function(boost::bind(&dispatch::Dynamic_Object::get_attr, + _1, + this->children[1]->text + ))) + ) + ), this->children[1]->text); + +// t_ss.add(fun(boost::function(boost::bind(&dispatch::detail::Dynamic_Object_Attribute::func, this->children[0]->text, + // this->children[1]->text, _1))), this->children[1]->text); } catch (const exception::reserved_word_error &) {