Re: where is error?



I humbly stand corrected.

Bob Caryl
Fiscal Systems,Inc.
256.772.8920 Ext. 108
http://www.fis-cal.com

This email message may contain privileged or confidential information. If you are not the intended recipient, you may not disclose, use, disseminate, distribute, copy or rely on this message or attachment in any way. If you received this email message in error, please return by forwarding the message and its attachment to the sender and then delete the message and its attachment from your computer.

Neither Fiscal Systems, Inc., nor its affiliates, accept any liability for any errors, omissions, corruption or virus in the contents of this message or any attachments that arise as a result of e-mail transmission.



Murray Cumming wrote:
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.
    

It should of course be

Glib::RefPtr<Radio_action> Radio_action::create(RadioActionGroup& group)
{
  return Glib::RefPtr<Radio_action>( new Radio_action(group) );
}

Again, I have no idea whether this will stop your segfault.

Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com


  


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