Ok, old school VB6 addict trying desperately to modernize, so cut me
a little slack here… what I want:
general declarations
Public global_answer(100) As Double
How do I achieve this in Xojo?
I am writing an app and in this app I need (I think I need anyway, teach me the
new ways if this no longer applies) a place to store a list of 100 numbers that
I want multiple functions to access. For example if:
I press push button I want to say global_answer(1) = val(text1.text)
I press push button 2 want to say global_answer(2) = val(text2.text)
I press push button 99 want to say global_answer(99) = val(text99.text)
(yes this is a stupid example)
The point is I want a “global” list… So not being totally stupid to the new
way of doing things, II have created a module named utilities. in utilities
I have created some properties. For example I created Gfloat (which is
a double) I can access this float from any part of any of the code by
saying utilitis.Gfloat = 3.1415 or in a different part of the code saying
result_string = utilities.Gfloat * diameter
The problem I have now, is that i need to declare an array of floats in
utilities. How do I do this? Is this even the “right” way to do this?
In order to ‘declare’ variables, (I mean “properties”) I use the IDE.
The IDE will not let me choose a type of double(100) that I want…
While I applaud the people who wrote the IDE, this process really sucks.
I hate not being able to type a dim statement, and being forced to use
a GUI tool for this.
Is there an equivalent to the DIM // Public in vb6 in Xojo?
If so, how and where??
So, whats the “right” way of doing this in 2019??? How far out to lunch
am I? Can someone please provide a simple working example?
Thanks!!