Jump to content

Bug in CustomControl->Button->MessageAction ?


bjarni

Recommended Posts

Hello,
I ran into problem where I had a screen with two instances of the same Custom control (see picture).

image.thumb.png.c7e63d442e8192ebb5d1648f81a5d1d8.png

Parameter to the control on left is TestFlag1 and on the right it's TestFlag2.  Accordingly THe light on left shows TestFlag1 ad the other is TestFlag2.

When a button is pressed, a message box pops up and when OK is pressed there the value of the parameter (TestFlag 1-2) is toggled.  Problem is that it doesn't matter which button I press, there is only the value of TestFlag2 which gets toggled (i.e. light on right toggles no matter which button I press)

If I skip the message box and do the toggle directly in the button press, the correct flags are always toggled.  Am I missing the correct way to do this or is it just something I have to work around ?

image.thumb.png.ae28edc000ac95b16970a25ea90d8bb5.png


Thanks,  Bjarni

Link to comment
Share on other sites

OK, I was able to reproduce the bug.

Currently you will have to work around this issue (like creating your own message box),

Please note that for a message box that you create then if you use a Rectangle element as a background, then presses are passed to the elements below it (Which is not good for you), but if you use a fixed text with a background, but with no text, and a dummy action linked to it, then it catches the touch events and do not pass it to the elements below it.

 

Link to comment
Share on other sites

OK, after looking at the code, fixing the bug would be much harder than I thought, and it requires people from several teams.

For now, it is a known issue, and a possible fix might be preventing message box actions on "Custom Controls parameters", but only on Global tags (including timers and IOs)

Link to comment
Share on other sites

  • 2 years later...
  • 7 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.