I created a global variable (intaz) in the process globals sub of the main module. I then dimmed a checkbox (chkazimuth) under global subs. I placed the checkbox on the main layout and used the following for a btnOK event within that layout. I also tried it within 'create activity....'
In another module the code is:
Problem is that main.intaz doesn't know it is supposed to be 1. Since it is a global variable, I just assumed its value would be recognized in all modules. It works fine if the checkbox is within the activity being accessed. Since I want to use this approach as a way to set preferences, I need to know the correct procedure. Please straighten me out. Thanks all.
Jim Schuchert
B4X:
sub btnOK_click
'other code
.
.
If chkazimuth.checked = true then intaz = 1
end sub
In another module the code is:
B4X:
If main.intaz>0 then do something
Problem is that main.intaz doesn't know it is supposed to be 1. Since it is a global variable, I just assumed its value would be recognized in all modules. It works fine if the checkbox is within the activity being accessed. Since I want to use this approach as a way to set preferences, I need to know the correct procedure. Please straighten me out. Thanks all.
Jim Schuchert