[Gambas-user] several issues

Benoît Minisini gambas at ...1...
Sat Sep 4 15:16:19 CEST 2010


> - The use of references to objects obtained from "parent" and
> "children" properties is cause of circular references.

If you create circular references, the interpreter can't do anything for you. 
But please explain exactly where and how, and I would be able you better.

> 
> - Gambas (2.21 and 3) only reported the existence of circular
> references when the execution is made step by step, but when the
> execution is made by pressing F5 nothing is reported.

Please tell me how to reproduce that, I don't have this behaviour at all.

> 
> - The warning message wasn't very helpful to me until I catch the
> problem begins to use of "Parent". Would be possible to add
> information to this message?

Which one? The interpreter knows that there are circular references because 
not everything has been freed. Then it can just tell the list of classes 
having not freed instances, and how many.

> 
> - When using gb.gtk if I set Autoresize property of any control to
> TRUE, and then I get its Width and Height properties the values are
> wrong.

I have tested with a Label, and I noticed that the behaviour was not the same 
with gb.qt and gb.gtk. So I fixed that (in Gambas 3). Then I tested a 
RadioButton, and it behaves as expected. In both case, the width and height 
properties were updated correctly.

So can you provide me some code so that I can reproduce your problem?

> 
> - If I want that the width of a TextBox fit your content, I haven't a
> method to do that accurately. I found that this "hack" works, but
> haven't confidence on it.
> 
>             TextBox1.W = TextBox1.Font.TextWidth(TextBox1.Text & "W")

See my comments in another mail.

> 
> - In:
>             TextBox1.Font.TextWidth(TextBox1.Text)
> 
> I see redundancy here because there's two references to TextBox1. This
> could be just: TextBox1.Font.TextWidth(), without a real parameter the
> default should be TextBox1.Text

Impossible, as TextBox1.Font is a font object. I won't create a different font 
class for each control so that it has a TextWidth() method specific to that 
control!

> 
> - I found more problems in gb.gtk, but in brief the problem is that
> behaviour is diferent in gb.qt y gb.gtk, so I write code that works to
> gb.qt but not work on gb.gtk and vice versa.

The goal is having gb.gtk and gb.qt behave the same as much as possible, so 
each time you encounter a difference, please provide me some code to reproduce 
it, and I will be able to fix it.

Some differences of course will never be fixable, but, as I said, let's try to 
minimize them.

> 
> These troubles are consumed too much of my free time. I don't like
> that. 

What could I say!

> So, I hope discover that I wrong (so I will learn something
> else) or that this report is useful to improve these details.

Yes they are. As soon as there are explicit enough, it help me fixing 
problems. But if they are too vague, it does not help a lot.

Regards,

-- 
Benoît Minisini




More information about the User mailing list