Re: where is error?



Robert Caryl wrote:

> > That's why you must implement your own create() method.   
> >
> > Paul Pogonyshev wrote:
> > Right. But I can't.
> 
> Mr. Pogonyshev, yes you can; try something like this:
> 
> <code>
> #include <gtkmm/main.h>
> #include <gtkmm/radioaction.h>
> #include <gtkmm/stock.h>
> 
> namespace {
> 
> class Radio_action : public Gtk::RadioAction
> {
> public:
>     Glib::RefPtr<Radio_action> create(RadioActionGroup& group) { 
>         return Gtk::RadioAction::create(group,"test",Gtk::Stock::ABOUT,"",""); 
>     }
> protected:
>     // now override to your heart's content
> };

This way an object of Gtk::RadioAction type is created.  There is no
derivation, at least not one that is active at run-time.  One last
possibility is to register a different wrapper for GtkRadioAction.
I'll report after I have tried it.

Paul



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]