1. Oscar Naranjo
  2. PowerServer 2020 or older (Obsolete)
  3. Sunday, 9 June 2019 23:26 PM UTC

Hi everyone,

I have an ItemChanged event that triggers a function with POST, this function has 3 reference arrays as parameters. The OK button script triggers twice the ItemChanged event but in debug mode, I only can see one. Then one of the reference arrays returns values no expected. I solved the problem removing the post-execution but I want to know if it could be a concurrent execution that are using the same reference arrays at the same time.  

BTW: this is a web application running in PowerServer 2017 R3

Best Regards,

Oscar Naranjo 

Miguel Leeuwe Accepted Answer Pending Moderation
  1. Friday, 5 July 2019 04:55 AM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 1

Hola Oscar,

 

The "post" won´t work correctly in debug mode if you "step" over it or step into it. If you want to check how it works, just put a debug stop in the event itself (the one that you call with Post). You can also put a stop before or after the call, but never "step" through or over the line. Just skip it by doing a "continue (ctrl+C)"

Since you are working with itemchanged() other things also might not go as expected. Remember that the debug window popping up will cause a losefocus event in your application and getfocus when coming back. For windows Activate and Deactivate events will be triggered.

If there´s an accepttext() anywhere in those events, your itemchanged event could be fired more times or not when you expect it.

An easy way around all of this, is to NOT debug, and insert some temporary messageboxes(). (though that also might make your window or dw lose focus).

HIH

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.