S Scantech Well-Known Member Licensed User Longtime User Dec 3, 2011 #1 This seems to be allowed in B4A. Is there anything I should be concerned about the Dim SRectGauge part. App is taking it ok. Do you guys ever call out statemanager in Process Globals, if not why? Code: Copy Sub Process_Globals Dim MGA as int MGA = AppMaxAllowedGauge Dim SRectGauge(MGA+1) '+1 is for Preview end sub Sub AppMaxAllowedGauge() As Int MGA = StateManager.ReadIni("MaxAllowedGauges", File.DirInternal, "Preference.cfg", 15) Return MGA End Sub Last edited: Dec 3, 2011
This seems to be allowed in B4A. Is there anything I should be concerned about the Dim SRectGauge part. App is taking it ok. Do you guys ever call out statemanager in Process Globals, if not why? Code: Copy Sub Process_Globals Dim MGA as int MGA = AppMaxAllowedGauge Dim SRectGauge(MGA+1) '+1 is for Preview end sub Sub AppMaxAllowedGauge() As Int MGA = StateManager.ReadIni("MaxAllowedGauges", File.DirInternal, "Preference.cfg", 15) Return MGA End Sub
Erel B4X founder Staff member Licensed User Longtime User Dec 4, 2011 #2 This code can be problematic. You should instead use Activity_Create, when FirstTime is true to set the array (call dim again). Upvote 0
This code can be problematic. You should instead use Activity_Create, when FirstTime is true to set the array (call dim again).