screen designer and some suggestion

acorrias

Member
Licensed User
Longtime User
Hi
I'm goig to develop a graphic application. My problem is that I've choosen a tablet potrait screeen setup (800x1280). But I can see only the left side of the emulator, so i cannot turn on the emualte phone.

Any help?

Again. My graphical application uses some variables that I need to modify interactively (I stop the graphical simultaion, I change the parameters with seekbars and checkbox, and then I return the graphics with a new set of parameteres.Do you suggest to make two activities, or it is better to use two panel?

I'd like to use pointers (as in C or C++) but I'have not seen this kind of object (in order to link a type object where a seekbar il sinket, for example, to a variable). Is it planned to have pointers in B4A?

thanks
alex
 

agraham

Expert
Licensed User
Longtime User
B4A compiles to Java. Managed languages like C# and Java do not expose pointers directly to the programmer. However variables for objects and arrays contain references (essentially pointers) to the area of memory where the object or array resides. You cannot access or manipulate these references directly but the compiler takes care of dereferencing them for you when required. You can assign them to other variables (of the correct type) and they are passed as parameters in calls so you should not find the lack of pointer limiting in your applications
 
Upvote 0

acorrias

Member
Licensed User
Longtime User
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):
:eek: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
 
Upvote 0
Top