1. Philippos Antonopoulos
  2. PowerBuilder
  3. Monday, 23 December 2024 14:58 PM UTC

Hello everyone,

We are experiencing an issue where a function is being called twice unexpectedly. Our assumption is that this behavior might occur due to the button being pressed twice. However, this should be impossible, as PowerBuilder operates mostly synchronously.

 

We are specifically investigating whether either of the following scenarios could allow the button to become active again prematurely, enabling a second press during execution:

 

  • The use of the sleep() function during the wait time.
  • An HttpClient SendRequest operation.

 

Does anyone know if either of these could potentially cause this issue, or if there are other factors we might be overlooking?

Thanks you in advance,

Philippos

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Monday, 23 December 2024 19:42 PM UTC
  2. PowerBuilder
  3. # 1

Hi Phillipos;

  This is typically because of poor programming. The correct CB coding to stop two+ clicks in a row should be (IMHO)... 

THIS.Enabled = FALSE 

SetPointer (hourglass!)

fn_do_something()

THIS.Enabled = TRUE

SetPointer (Arrow!)

HTH

Regards ... Chris 

Comment
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Monday, 23 December 2024 15:06 PM UTC
  2. PowerBuilder
  3. # 2

Hi.

Sleep should not have such an impact. But using yield() would have...

Andreas.

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.