Bug with using Global Variables?

morpheus93

Client
Регистрация
25.01.2012
Сообщения
1 058
Благодарностей
244
Баллы
63
Hi guys,

tried do use global variables in 2 of my projects. First it worked ok but after some time project B can't access the global variable set by project A. Deleted and added the same global varibale with the same name in both of the projects but still not working in ZP. Created 2 new testing projects where the first one only sets a global variable and the second one shows it in a message box, but the same thing - it worked for a while in ZP but then the variable is shown as empty.

Is this a bug and is there a workaround?

Using V 5.0.7.0 on Win8.1 64 bit with .Net Framework 4.5

Thank you.
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 715
Баллы
113
Make sure you dont have this variable in variable list for project B
 

morpheus93

Client
Регистрация
25.01.2012
Сообщения
1 058
Благодарностей
244
Баллы
63
Thank you for your answer. When I create the global variable in project A it is automatically within the variable list of project B (when I have opened both projects at the same time in PM). Ok, when I delete it manually from project B (it is also deleted from the list of project A), but it seems to work, although the global variable isn't shown in any of the variable lists.

My purpose for using glob. variables is to control 2 or more projects mutually, so if project A is working, project B waits till A is finished and vice versa. I tried to solve this using a glob. varible e.g. "IsRunning" which is set to 1 at the beginning of one of the projects and to 0 at the end. The other project checks at the beginning if "isRunning" is 1 or 0. If 1 it loops through a 10 second pause till "isRunning" is 0 and then goes on.

If I understand you right a glob. variable can only be declared and initialized in one project and only read in other project. So my above purpose isn't possible with global variables?

Maybe a solution could be using a list (linking to a .txt-file) where the status (0 or 1) of project A is written and can be acessed from project B and vice versa?

Thx
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 715
Баллы
113
If I understand you right a glob. variable can only be declared and initialized in one project and only read in other project. So my above purpose isn't possible with global variables?
Possible, why not?
But you should initialize it on 1 template only. template 2 can only read it and perform actions with it.
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)