Re: where is error?



Murray Cumming wrote:

> On Mon, 2006-08-07 at 20:44 +0300, Paul Pogonyshev wrote:
> > Murray Cumming wrote:
> > > Gtk::RadioAction must be used via a RefPtr, obtained via its create()
> > > function. The same is true for derived classes, so you'll need to add a
> > > create() function that returns a RefPtr.
> > 
> > This certainly won't help anything since the crash happens when the
> > constructor is executed.
> 
> I suggested that you try gdb or valgrind rather than that you ask me to
> try them for you.

It is not my library, I'm not going to debug it.  The example _only_ calls
the constructor of a standard class.  If it crashes, it is not my fault,
but Gtkmm's one.  (Unless you point an error in my 10 lines of code, which
I doubt.)

> >   Creating a RefPtr _afterwards_ won't change
> > anything.  Calling Gtk::RadioAction::create () creates Gtk::RadioAction,
> > not an object of the derived class.  
> 
> That's why you must implement your own create() method.

Right.  But I can't.

> > So, it seems to be impossible to
> > derive from Gtk::RadioAction at all, at least with Gtkmm 2.4.10.
> 
> If the constructor is protected (not private) then you can do this.

If the contstructor crashes when invoked from a derived class, that
means I practically can't.

Did you check the example with modern Gtkmm?  Does it crash there too or
does it work fine?

Paul



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