Hi all, i want to replace dinamically variables in strings. Something like this
I recibe a string in a JSON and after the parse i obtain this:
JSONdata = "The New date is: g_date"
the app has the variable:
Dim g_date as String
g_date = "31/12/2022"
So i need when i put the JSONdata to a...
If I understand correctly, the variables that are written in Process_Globals will be created when the Activity Module is created. How long can they exist?
For example, I have the main module Main and in it I created several Process_Globals variables. When will variables in a given module be...
In https://www.b4x.com/guides/B4XPagesCrossPlatformProjects/?page=23 it states that you can refer to Public variables in another module by use of code:
Public Page2 As B4XPage2 = B4XPages.GetPage("Page 2")
Page2.lblTest.Text = "Page 3 was displayed."
I would like to do this to refer to a number...
I am new to B4A so please bear with me. I have a customlistview which has items in it. I am trying to make it so that if a user clicks on an item, it will be able to retrieve all details about that item (The text and value). I have got the value, but I've got no idea about how to find...
I have noticed this happens occasionally and maybe I should have asked the question earlier. This example applies to B4i but I have also noticed it happening in B4A.
Dim ThisPosition As LatLng 'Before the loop
Do While Locations.NextRow...
it seems it is not possible to use a type variable in another type variable.
Type WLAN_Type (IP As String, SSID As String, Password As String, Chanel As Byte, BSSID As String)
Type Settings(Resets As UInt, Summertime As Boolean, WLAN As WLAN_Type)
Scanning through the forum it appears that (using V4B 8.3+) it is OK to define global variables in the Starter Server (in the sub Process_Globals) as it will not be removed by the OS whilst the App is running, Question - is that correct?
Also, would I be safe to store global variables...
If we have a sub like this...
' This is a very important sub
Public Sub showingOff
Msgbox("Never use Msgbox", "Important message")
...we get very nice docs when hovering that sub name in other code:
However, if we do the same with a variable:
' This timer is very important...
Have a simple B4A app with 2 modules, Main and Starter. Both need to do logging, but only in debugging mode. I have a Public variable for this bLog, which I have declared in the Starter module like this:
Public bLog As Boolean
The Sub that does the logging is in...