FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WINDEV Mobile 2024
→
Global variable is forgotten
Global variable is forgotten
Débuté par Mirte VANBERGHEN, 09 mai 2018 15:21 - 1 réponse
Connectez-vous…
Mirte VANBERGHEN
#1
Membre enregistré
7 messages
Posté le 09 mai 2018 - 15:21
Hi everyone
I'm creating an app in which I'm using threads in the Android part in order to make the HTTP requests run smoothly. Certain values from the logon are remembered in global variables after the first request in the first thread, but they don't seem to be remembered through the different threads and I don't know why or how to fix this ...
When I create an info popup with the value after every thread, it does get remembered and the request can use the value put in the variable, but if I don't the values are gone.
Is there someone who can help me fix this? Or who can tell me what I might be doing wrong or forgetting?
I've been told to make the declarations of the variables 'volatile', but Windev doesn't seem to support this by simply adding the word. Is there a different way of doing this? The theory for this is that the problem could be related to compiler optimizing.
I appreciate any help that anybody can give!!
Kind regards
Mirte Vanberghen
Signaler
0
0
ARV
#2
Membre enregistré
498 messages
Popularité : +8 (8 votes)
Posté le 10 mai 2018 - 19:14
Hi Mirte
do you declare this variables on the window or on the project?
The type of the variable are equal to the data itself?
On your threads Do you use those variables to change the info or something?
Best regards
Jose
Signaler
0
0
→ Revenir à WINDEV Mobile 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (précédentes versions)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Type de recherche
Uniquement les sujets
Tous les messages
Période de recherche
Date indifférente
Moins d'une heure
Moins de 24 heures
Moins d'une semaine
Moins d'un mois
Moins d'un an
Annuler
Aperçu de votre message
Ajouter une image
Importer une image depuis une URL
Envoyer une image depuis un fichier de votre disque
Déposez ici un fichier ou cliquez sur "Parcourir..."
ou
Annuler
0%
WLangage
SQL
XML, HTML
JAVA, Javascript
Texte