Project launch mode does not show the correct information whereas the designer mode does

Hello everyone,

For an application, I can see the correct information on the designer mode, so for example I can see number 3 and 3 arrows in the picture below:
image

however, when I launch the project I can see the information above for 1s only, and then it suddenly changes to
image

This is a really wired problem and I do not know how to fix it. I do not understand why I should see the correct information on the designer mode but not when the project is launched.

P.S. I saved my project and even closed and opened it again.
Also, I changed the client permissions in the project properties to allow ‘legacy database access’. But still had no chance to fix this.

I greatly appreciate your information.

You’ll have to post the script driving the visibility of the arrows and the value. This is most likely some sort of data race or events are happening that you aren’t expecting.

1 Like

I do not understand why I see correct information on the designer mode but not when I lunch the project?
This is the code for arrows:

if({Root Container.desc.text} != "Left" && {Root Container.keeper.visible} = 1 && {Root Container.keeper.value} = 4 || {Root Container.keeper.value} = 3, 1,
	if({Root Container.desc.text} != "Right" && {Root Container.keeper.visible} = 1 && {Root Container.keeper.value} = 4 || {Root Container.keeper.value} = 3, 1,
      0
      )
  )

This is the code for the value:

if({Root Container.height.value} <= 37.9 && {Root Container.height.value} >= 22, 2,
		if({Root Container.height.value} <= 61.9 && {Root Container.height.value} >= 38, 3,
					if({Root Container.height.value} <= 78 && {Root Container.height.value} >= 62, 4,
      					0
)
)
)

and this is for the visibility of value:

if({Root Container.desc.text} = "up" && {Root Container.height.value} >=22, 1,
	if({Root Container.desc.text} = "bottom" && {Root Container.height.value}>=22, 1,
		0
)
)

First off, try this for the value expression.

case(True
	, {Root Container.height.value} >= 62, 4
	, {Root Container.height.value} >= 38, 3
	, {Root Container.height.value} >= 22, 2
	, 0
)
1 Like

For the arrows visibility expression, I prefer to try using equal to instead of not equal in most cases (unless you need to filter out a single case and accept many). Next your logic is 2 logical ands and one logical or. It seems like you might need to group the ands together with parenthesis?

Case(True
	, ({Root Container.desc.text} = "Right" && {Root Container.keeper.visible} && {Root Container.keeper.value} = 4) || {Root Container.keeper.value} = 3, 1
	, ({Root Container.desc.text} = "Left" && {Root Container.keeper.visible} && {Root Container.keeper.value} = 4) || {Root Container.keeper.value} = 3, 1
	, 0
)

Edit:
Actually, if Left and Right are the only two choices for {Root Container.desc.text} you don’t need it in the expression at all.

The expressions are pretty much the same, you probably can reduce this down to

({Root Container.keeper.visible} && {Root Container.keeper.value} = 4) || {Root Container.keeper.value} = 3
1 Like

Also, the title is making me hungry :wink: Project Lunch Mode, I definitely need to add that to my projects.

1 Like

I tried everything you said but it did not work, I still have two arrows and number 2 on launch mode and 3 arrows and number 3 in designer mode. I guess my problem is with the tag binding somewhere in the program that tag is getting command from another tag.

Haha!! :smiley: I am very bad with spelling! nice catch though :smiley:

I used another component and bind that to the code and it worked, I guess the problem is with my code, somewhere a value is bonded to two/three things and that causes the problem.

Operation precedence will mean ANDs will happen before any ORs, but it’s still always a very good idea to explicitly define your intentions by adding brackets around such expressions.

1 Like