Jump to content
bjarni

Bug in CustomControl->Button->MessageAction ?

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

Share this post


Link to post
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.

 

Share this post


Link to post
Share on other sites
12 minutes ago, Saragani said:

Can you share a project, so I can reproduce the problem easily, and fix the bug?

Hi, can I send it to you?   Don't feel comfortable leaving the whole stuff here in the open...

Share this post


Link to post
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)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...