openFrameworks icon indicating copy to clipboard operation
openFrameworks copied to clipboard

ofDragInfo issue

Open Jonathhhan opened this issue 1 year ago • 2 comments

I have an error with ofDragInfo when I try to make Lua bindings in ofxLua:

No operand found that accepts an operand of type std::vector<std::string,std::allocator<std::string>> on the right.

If I replace of::filesystem::path with std::string at line 111 in ofEvents.h it works (maybe better to replace std::string with of::filesystem::path instead?):

//-----------------------------------------------
class ofDragInfo {
public:
	std::vector<of::filesystem::path> files;
	glm::vec2 position;
};
//-----------------------------------------------
class ofDragInfo {
public:
	std::vector<std::string> files;
	glm::vec2 position;
};

Jonathhhan avatar Apr 21 '24 04:04 Jonathhhan

I would try to edit ofxLua bindings, maybe something like this:

      SWIG_fail_ptr("DragInfo_files_set",2,SWIGTYPE_p_std__vectorT_std__string_t); }  if (arg1) (arg1)->files = *arg2;
    return SWIG_arg; fail: SWIGUNUSED; }  lua_error(L); return 0; }

dimitre avatar May 01 '24 00:05 dimitre

cc @danomatika

dimitre avatar May 01 '24 00:05 dimitre