[Gambas-user] Normal behaviour for GTK+?

Kad Mann nospam.nospam.nospam at ...626...
Wed Oct 14 23:19:19 CEST 2009


On Wed, 2009-10-14 at 19:35 +0200, Benoît Minisini wrote: 
> > On Tue, 2009-10-13 at 18:58 +0200, Benoît Minisini wrote:
> > > > This has me pulling my hair out. I think I have narrowed the problem
> > > > down to the GTK+ toolkit for Gambas.
> > > >
> > > > If I create a GTK+ project and put a TextBox and a ValueBox on a form
> > > > and set their default values, when I tab to the TextBox I can over-type
> > > > the text, but when I tab to the ValueBox, the number I type is
> > > > appended:
> > > >
> > > > For example, if the ValueBox contains 5000 and I type 7, the value
> > > > becomes 50007.
> > > >
> > > > However if I change the project to use a Qt GUI, it works as I expect,
> > > > i.e. if the ValueBox contains 5000 and I type 7, the value becomes 7. I
> > > > have been able to reproduce this behaviour.
> > > >
> > > > Is that normal for GTK+? Is there anything I can do short of using Qt?
> > > > Am I doing something wrong?
> > > >
> > > > Also, I can't find any documentation why I might use Qt in Gambas as
> > > > opposed to GTK+ in Gambas. Opinions on what is best and why will be
> > > > appreciated.
> > >
> > > Which version of Gambas do you use?
> > 
> > V2.16.
> > 
> > >  I had to make an hack in gb.gtk recently
> > > to make all basic events (Mouse, Keyboard, Enter and Leave) behave the
> > > same way as in gb.qt. But the 2.17 is not released yet (I'm currently
> > > busy with a theatre play), but you can try /branches/2.0 in the svn
> > > repository.
> > >
> > > Can you make a little project for me that has the bug you describe? I
> > > will test it with the future 2.17, and I will see if the bug has gone.
> > 
> > I can make one a lot smaller than "little":
> > 
> > PUBLIC SUB Form_Open()
> > 
> >   ValueBox1.Value = 999
> > 
> > END
> > 
> > :)
> > 
> > Create a new GTK+ project with no options, drag a ValueBox to the
> > default form. When you run the app, tab into the ValueBox so that 999 is
> > selected then type another number.
> > 
> 
> OK. There was a bug in the gb.gtk TextBox.Insert() method. The selected text 
> was not deleted by the insertion, as usually expected.
> 
> I fixed it in revision #2394.

lol - I found my first bug! I'll buy some Aussie beer tonight and will
celebrate. Glad I could help.

Look, I've got a lot of documentation experience so I've sent an email
to 'gambas' to sign up for access so I can help out. If the requests go
to you, the one arriving about now is from me.

> Regards,
> 





More information about the User mailing list