pointer and variables
Sorry for my example.
Suppose a lot of variables defined into an activity (main) as global
Dim a1,t2,v3,g6,h7,a9,v0,w4,...... ,t8 as double
suppose a secondary activity where I define a new type:
type gui_obj (lb as label, sk as seekbar,)
and an array of gui_obj
dim GUI(30) as gui_obj
It would be good to have the possibilty to use a pointer in order to let each gui_obj to change the pointer-variable. Without pointer it is very hard to program a complex gui.
nowmy code uses this for each variable several objects (supposing to have a label - to show the value and a text, and a seekbar to change the value):
n startup - Activity_Resume
:
Label1.Text ="a1: " & Main.a1
SeekBar1.value = Main.a1
:
Sub SeekBar1_ValueChanged (Value As Int, UserChanged As Boolean)
v.Text= "a1: " & Value
Main.a11=Value
End Sub
I'd like to have a compact method to set a pointer inside my structure. How could code my objective? could you expore you method with variables? The only way I could suppose is to use arrays and to to store index array. But this method generates a bad code, where variables are not "talking" (thats to say its more easy to read inside the code mean-velocity than a(4)).
cheers
alex