Tomasu / LuaGlue

C++11 Lua 5.2 Binding Library
zlib License
79 stars 22 forks source link

Overloaded functions? #62

Closed ricanteja closed 10 years ago

ricanteja commented 10 years ago

Is there a way to bind overloaded class functions with LuaGlue? I tried but couldn't figure it out. (I just tried method("my_func", &MyClass::MyFunc).)

Sorry to post this here, is there any other way to get in touch with you? I'd hate to pollute your Git with user questions..

DominikMS commented 10 years ago

I think this is not possible.

ricanteja commented 10 years ago

Ok I thought so, I checked the examples and found nothing about it. Whenever I have a question about how to implement something with LuaGlue I just scan through the source code of the example projects but it's hardly a good place for people to learn from.

DominikMS commented 10 years ago

Everythings are in examples. This is not hard to learn if you know c++.

ricanteja commented 10 years ago

I'd argue that having documentation makes learning faster than reading source code.

Tomasu commented 10 years ago

I think it is possible if you specifically cast the method pointer to the right signature first. I think.

You are right that documentation is needed. but I don't have a lot of time for personal projects, and theres a lot of work to be done on the code itself still. :(

ricanteja commented 10 years ago

I completely understand and trust me I appreciate everything you are doing with this project. Maybe I could write documentation for you?

Tomasu commented 10 years ago

Contributions are always welcome :) :+1:

ricanteja commented 10 years ago

Alright then, I'll work on it after I get somewhere noticeable with my project.