[Gambas-user] TreeView.Count value differs using qt rather than gtk
Doriano Blengino
doriano.blengino at ...1909...
Tue Jan 26 13:13:32 CET 2010
Kadaitcha Man ha scritto:
> 2010/1/26 Doriano Blengino <doriano.blengino at ...1909...>:
>
>
>> This is a more general problem of gambas syntax. Is Listbox1[5] the
>> sixth element of an array of listboxes, or the sixth element of
>> Listbox1?
>>
>
> You are confabulating and conflating.
>
At least, I *think*. You don't think enough, and prove of it is that
more often than not you write two messages instead of one. You start to
write too early.
You are not really catching the point. I am writing these things because
I believe that it could help Benoit in some way - he expressed some
doubt about wanting to have the count of both total elements and just
children. If it was only for you, I had stop before. But we are on the
way... if you want to get angry read on.
>> I never tried to make array of listboxes
>>
>
> There you go then, hey. So, why do you ask me the answer to a problem
> you have never tried to solve for yourself?
>
> Anyway, the answer to your question is Is Listbox1[5] is the sixth
> element of [a control named] Listbox1.
>
> How do I know? Because I can read.
>
> The problem isn't 'a more general problem of gambas syntax". There is,
> at best, a problem with the documentation. If the documentation were
> clear and concise, which it is not, there would be no debate.
>
I can speak about things I never tried because I *think*. Moreover, I
didn't ask you to solve. I was "reporting", "arguing", "thinking", not
"asking". Ok?
Anyway, I just tried - it doesn't work. If you read my previous mail, I
wrote "I wonder if....". I was right - In fact, it does not work. This
is first a problem of documentation, which lets you think you can make
typed arrays, but this is not always true.
Second problem, the impossibility to make typed arrays is a limitation.
You don't see it as a limitation because you are limited yourself - too
lazy to think, may be, and I don't want to say you have limited
experience or you are stupid.
>
>> So, TreeView1.Children[0] would be a coherent way to address the first
>> children
>>
>
> Perhaps it would be coherent, but if it is not also consistent, which
> it is not then it is wrong.
>
When you will be able to explain why "it is not consistent", you will
discover *you* are in error. But I doubt you can afford. It seems that
you give importance to superficial things, without forcing your mind to
go beyond comfortable and limited schemes. Before trying to argue with
me, read some documentation about the plethora of other programming
languages. Only then our discussions will elevate to a better degree.
While I am writing, I notice you have already answered. You can not even
wait some minutes to reply.
Ok, this is the reply to your just arrived message:
> Tree1 is a TreeView, not a node.
> >>>
>
> >>
> >> Therefore tv["Tree1"].Count = 2 is still true.
> >>
>
> > No, it is false. tv["Tree1"].Children.Count is two.
>
>
> Take a step back.
>
> If, as you say, tv["Tree1"].Children.Count is two, then, as I say,
> "tv["Tree1"].Count = 2 is still true", is true.
>
> HTH
It is me, now, who is getting stunned. Are these two expressions different?
1. tv["Tree1"].Count
2. tv["Tree1"].Children.Count
No? Then you are very confused.
Yes? Then they return two different results.
I repeat, Tree1 is the treeview itself. I called it tree1, and you
called it tv. tv["tree1"] does not exist. I simply repeated your names
to stress on the difference between ".Count" and ".Children.Count".
Anyway, you insist on this not-so-beautiful syntax of using strings
inside square brackets (I will not loose time explaining the drawbacks
of it), so I used it too in an attempt to speed up things.
I am asking myself whether there is some sense in continuing this
discussion. It depends on your next message. If I get convinced you are
really interested in exchanging opinions, and contribute to gambas and
its users, ok. If I get convinced that you only like to piss off other
persons, I will not reply. May be that I am wrong, but I have already
showed enough patience.
Regards.
More information about the User
mailing list