Is there a bug in pui.click() ?

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
dieter
Experienced User
Posts: 122
Joined: Tue May 22, 2012 6:45 am
First Name: Dieter
Last Name: Schröder
Company Name: Ecclesia Holding GmbH
State / Province: Outside Canada/USA
Country: Germany
Contact:

Is there a bug in pui.click() ?

Post by dieter »

Hello,
i have a mask with a cancel button. When the user clicks this button, the application and the Genie Session shall end. I don't want to have the "are you sure you want to leave this page" - message, when the program ends. Therefore i set in the onload event of the screen this code: pui.skipConfirm = true;

But this is a very "global" solution. I think it would be better, if "pui.skipConfirm = true;" would only be executed when the cancel button is clicked. This should have the effect that user doesn't get the confirm message, when he clicks the cancel button but the he will get the message when he leaves the screen in an incorrect manor (e.g. by closing the Browser).

So i moved the "pui.skipConfirm = true;" from the onload event to the onclick-event of the cancel button. But then the button does not work any longer. Even if i append the code pui.click('btnCancel") to the onclick event of the button, the button does not trigger the onclick event.

Has anybody an idea?

Thanks,
Dieter
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Is there a bug in pui.click() ?

Post by Scott Klement »

It will not work to have both a "response" and an "onclick" on the same button. Each button youj create should have only one or the other. Either an onclick or a response property, not both.

One easy workaround is to put a hidden button on the screen. Have the response of the hidden button set an indicator, or whatever your button does.

Then, add a visible button, and use the onclick for that button to turn off the confirmation, and do a pui.click() on the hidden button.
dieter
Experienced User
Posts: 122
Joined: Tue May 22, 2012 6:45 am
First Name: Dieter
Last Name: Schröder
Company Name: Ecclesia Holding GmbH
State / Province: Outside Canada/USA
Country: Germany
Contact:

Re: Is there a bug in pui.click() ?

Post by dieter »

Thank you.
Dieter
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests