1. ATK Gimmy Susan
  2. PowerBuilder
  3. Tuesday, 29 September 2020 13:45 PM UTC

What is the difference between:

this.event close ()
close (this)

(written on an event eg: postretrive)

 

I notice that:
- the first executes the event script, but does not close the window
- the second runs the script and closes the window

Because ?

thanks in advance for the answers

 

Gimmy

 

 

Accepted Answer
John Fauss Accepted Answer Pending Moderation
  1. Tuesday, 29 September 2020 14:45 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi, Gimmy - 

This.Event Close() triggers (executes) the Close event script only in response to the object containing the Close event to having been closed. It does not initiate any action unless the code in the script tell PB to take some action. This example executes the script without any action having been requested or initiated.

Close(this) is a PowerScript function that closes the object that is executing the function. In other words, it initiates an action whereas the Close event script gets executed in response to the Close action having been initiated.

HTH

Regards, John

Comment
  1. ATK Gimmy Susan
  2. Wednesday, 30 September 2020 07:28 AM UTC
simpler than expected
  1. Helpful
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Tuesday, 29 September 2020 17:39 PM UTC
  2. PowerBuilder
  3. # 1

The Close function triggers the Close event and then closes the window. Event.Close() triggers the event but does not close the window.

 

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.