Forum: wxRuby wxAuiTabCtrl is not supported

00e4a880b1262a125b5e342e4b536765?d=identicon&s=25 Lui Kore (night_stalker)
on 2010-03-08 15:35
When calling AuiNotebook#children, I got an error:
Error wrapping object: class wxAuiTabCtrl is not supported in wxRuby


It's exactly the object I want to set_tool_tip on.
I don't know how to use swig, I tried the following:


// AuiTabCtrl.i
%include "../common.i"
%module(directors="1") wxAuiTabCtrl
GC_MANAGE_AS_WINDOW(wxAuiTabCtrl);
SWIG_WXWINDOW_NO_USELESS_VIRTUALS(wxAuiTabCtrl);
%import "include/wxControl.h"
%import "include/wxEvtHandler.h"
%import "include/wxWindow.h"
%import "include/wxObject.h"
%import "include/wxAuiNotebook.h"
%include "include/wxAuiTabCtrl.h"


// include/wxAuiTabCtrl.h
#ifndef _wxAuiTabCtrl_h_
#define _wxAuiTabCtrl_h_
class wxAuiTabCtrl : public wxControl {};
#endif


// and added this line in parents.rb
'wxAuiTabCtrl' => 'wxControl',


But the generated class just doesn't compile. Any hint?
06f6780c99d4a8dd71f2b474082ea9ce?d=identicon&s=25 Alex Fenton (Guest)
on 2010-03-23 21:31
(Received via mailing list)
Hi

Sorry for the delay

On 08/03/2010 14:35, Lui Kore wrote:
> When calling AuiNotebook#children, I got an error:
> Error wrapping object: class wxAuiTabCtrl is not supported in wxRuby
>
>
> It's exactly the object I want to set_tool_tip on.
> I don't know how to use swig, I tried the following:
>
>

We'd be pleased to add this class in a future version

....

> // include/wxAuiTabCtrl.h
> #ifndef _wxAuiTabCtrl_h_
> #define _wxAuiTabCtrl_h_
> class wxAuiTabCtrl : public wxControl {};
> #endif
>

Here you probably need at least the constructor definition and public
methods:

{
public:

     wxAuiTabCtrl(wxWindow* parent,
                  wxWindowID id = wxID_ANY,
                  const wxPoint& pos = wxDefaultPosition,
                  const wxSize& size = wxDefaultSize,
                  long style = 0);

     ~wxAuiTabCtrl();

#if wxABI_VERSION >= 20805
     bool IsDragging() const { return m_is_dragging; }
#endif
};

Have a look at one of the other working classes - currently SWIG relies
on having the constructor and method declarations here to wrap them.

hth
alex
This topic is locked and can not be replied to.