[Gambas-user] VB to Gambas
Charlie
karl.reinl at ...9...
Sat Mar 5 00:28:33 CET 2005
Eilert schrieb:
> No, I still don't get it running this way. :-)
>
> This time I included it like here. This is intended to give default
> values for a table. There is a class named "tab" with the variables
> and an Object[] named tb. Then within Form_Activate I do this:
>
> DIM tabelle AS NEW tab
>
> '[blabla]
> 'a lot of single values that may stay for all columns
> 'so just an example:
>
> tabelle.SpalteBreite = 30
>
> FOR i = 0 to 4
> tabelle.KopfText = "Kopf" & Cstr(i)
> tb.Add(tabelle)
> next i
>
> So in my opinion, it should store the same values for SpalteBreite,
> but different strings for KopfText. Now, when I want to read the
> values for a certain column, I always get the same; the same value as
> for the last item:
>
> PUBLIC SUB Spaltennr_Change()
>
> txtKopf.Text = tb[Spaltennr.Value].KopfText
>
> END
>
> always gives me "Kopf 4". I've tested tabelle.KopfText within the
> FOR-NEXT loop, that one is ok. Giving a fixed value like
> tb[2].KopfText also returns "Kopf 4".
>
> What do I do wrong here?
>
> Thxs for your help!
>
> Rolf
Salut Rolf,
if you are NOT working for the CIA or the KGB (if still exists), and you
project is NOT 'top secret'
please post your project or a working cut of the project, where others
can reproduce the problem.
It is not easy to help you, if you talk about a table ? (which table, an
array, a TableView or what else is it)
which is in a class named 'tab' ?
With the code, it would be easier for the guys, to help you ! OK
Amicalment
Charlie
More information about the User
mailing list