"No static 'LoadFromImage' in class 'sfImage'"

Teto <[email protected]>
Newsgroups gmane.comp.lang.lua.bind.user
Message-ID <[email protected]>
Hi everyone,

First of all let me express my admiration for the luabind coders who
coded really well their library.
I meet the problem described in the title when calling a member
function of an SFML class ( www.sfml-dev.org ) from Lua:

Here is the class I want to use in lua ( from the doxygen documentation )
00038 namespace sf
00039 {
00040 class RenderImage;
00041 class RenderWindow;
00042
00047 class SFML_API Image : public Resource<Image>
00048 {
00049 public :
00050
00055     Image();
....
00099     bool LoadFromFile(const std::string& Filename);




So I've written the following code to export the previous function

    // Export our class with LuaBind
    luabind::module(mScript.mLuaState) [


    luabind::class_<sf::Image >("sfImage")
        .def("LoadFromFile",&sf::Image::LoadFromFile)
}

It compiles fine, launches the following lua script:
print 'test'
logo = sfImage;
logo:LoadFromFile("images/bluecosmos.png");


It displays 'test' then "No static 'LoadFromImage' in class 'sfImage'"
But LoadFromImage is no static function.How to solve this problem please ?

thx

Matt

------------------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.