constants
% contenu_visible = b_true.
contenu_visible = b_false.
clauses
start():-
if contenu_visible = b_true then
Win = getVpiWindow() % here is TaskWindow\frm1.pro(52,15)
else
Win = applicationWindow::get():getVpiWindow()
end if,
Container = activeXContainer::new(Win),
First of all,
You have used the constants value
Code: Select all
constants
contenu_visible = b_false.
You can't change a constant value anywhere in the code - It is the one time initialization
The value for the constant variable is " b_false" - So, It always move to else loop - As a result, there is no use of "contenu_visible = b_true" condition which always fail..
Now see your code :
Code: Select all
clauses
start():-
%No use of If clause - it will always fail and move to else loop
%Because you are using the constant variable that never change during run time
if contenu_visible = b_true then
Win = getVpiWindow() % here is TaskWindow\frm1.pro(52,15)
else
Win = applicationWindow::get():getVpiWindow()
end if,
Container = activeXContainer::new(Win)
If you want to make the contenu_visible variable to change during run time, you may use,
fact variable or properties and make use that for the if loop comparison
example
Code: Select all
facts
contenu_visible : boolean := true.
Ex: