[glade--]Re: [gtkmm] Problem with gtkmm handling comboboxes from glade



Am Fre, 2001-11-30 um 21.38 schrieb Daniel Elstner:
> Am Fre, 2001-11-30 um 18.25 schrieb John Bartelt:
> > On Friday 30 November 2001 07:51 am, you wrote:
> > > Ahh, now I remember that one.
> > > Try if it works after removing the parentheses around items[].
> > 
> > No, it doesn't help. I don't think it has to do with scope, but with 
> > constness.
> > 
> > I had a reply from vadim vk crocodile org saying that he had the same problem 
> > and fixed it by running a perl script on the generated code to change " const 
> > char * const " to " const char * ". I've confirmed that this works.
> > 
> > Now the question: which should be fixed, glademm or gtkmm?
> 
> Certainly gtkmm.  I'll look at it.
> 
> I think we can make this change without breaking the ABI since SArray
> seems to be all inline anyway.  Murray?

Well, I've looked at it.  This test proggy compiles just fine w/o any
warnings, trying both gcc-2.95.4 (prerelease) and gcc-3.0.2:

    #include <gtk--/base.h>
    #include <gtk--/combo.h>

    const char *const items[] = { "foo", "bar", 0 };

    int main(int, char**)
    {
      Gtk::Combo combo;
      combo.set_popdown_strings(items);
      return 0;
    }

So I suppose it's a gcc-2.96 bug.  It looks like it doesn't choose the
right specialization of Traits<> for array types.

--Daniel




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