PyCEGUI No to_python (by-value) converter MouseCursor

If you found a bug in our library or on our website, please report it in this section. In this forum you can also make concrete suggestions or feature requests.

Moderators: CEGUI MVP, CEGUI Team

User avatar
dermont
Quite a regular
Quite a regular
Posts: 75
Joined: Mon Aug 29, 2005 16:15

PyCEGUI No to_python (by-value) converter MouseCursor

Postby dermont » Mon Jun 11, 2012 10:07

There appears to be a problem in the python module returning a MouseCursor:

Code: Select all

PyCEGUI.System.getSingleton().getDefaultGUIContext().getMouseCursor().setDefaultImage("TaharezLook/MouseArrow")

>>> InitializationError: No to_python (by-value) converter found for C++ type: CEGUI::MouseCursor


From a quick look at your bindings it chokes on returning a bp::copy_const_reference (copy ctor ?) but MouseCursor has been declared as nobcopyable in your bindings.

GUIContext.pypp.cpp

Code: Select all

        { //::CEGUI::GUIContext::getMouseCursor
            typedef ::CEGUI::MouseCursor const & ( ::CEGUI::GUIContext::*getMouseCursor_function_type )(  ) const;
            GUIContext_exposer.def(
                "getMouseCursor"
                , getMouseCursor_function_type( &::CEGUI::GUIContext::getMouseCursor )
                , bp::return_value_policy< bp::copy_const_reference >() );
        }


generateCEGUI.py

Code: Select all

    # CEGUIMouseCursor.h
    mouseCursor = CEGUI_ns.class_("MouseCursor")
    mouseCursor.include()
    mouseCursor.noncopyable = True


I think, but could be wrong, the solution would be to exclude the const GUIContext::getMouseCursor method in your bindings.

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: PyCEGUI No to_python (by-value) converter MouseCursor

Postby Kulik » Thu Jun 14, 2012 11:31

Hmm, this really looks like a bug in mercurial PyCEGUI. I wonder if the same doesn't apply to 0.7 release PyCEGUI.

Will make some investigations of this later, thanks for reporting!

EDIT: mantis ticket: http://cegui.org.uk/mantis/view.php?id=836


Return to “Bug Reports, Suggestions, Feature Requests”

Who is online

Users browsing this forum: No registered users and 6 guests