Hi, I'm probbaly missing something in the docs, etc. but how do we go about creating types like gravity, colors, etc in B4A?
For example:
Thanks!
John
EDIT: I believe I found a decent solution but if there is a better one pls advise.
Solution:
Create a code module with name of type and delcare variables (i.e. constants) and set their value
Example:
TMyType (code module name)
Public Up as int=1
public Down as int=2
MyClassA as MyClass
MyClassA.mt=TMyType.Up
For example:
B4X:
MyType (Up,Down,Left,Right)
ClassA
public mt as MyType
....
Dim MyClassA as ClassA
MyClassA.Initialize
MyClassA.mt=mytype.Up
Thanks!
John
EDIT: I believe I found a decent solution but if there is a better one pls advise.
Solution:
Create a code module with name of type and delcare variables (i.e. constants) and set their value
Example:
TMyType (code module name)
Public Up as int=1
public Down as int=2
MyClassA as MyClass
MyClassA.mt=TMyType.Up
Last edited: