Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 18 FEB 1999 06:37:29AM Antonia Azpurua wrote:

Every time I activate for example

.DETALLES-]SELPOS=Prev_xy

.DETALLES-]TEXT=Another Text'

on the CHANGE event, the POSCHANGE event starts working also.

How can I forbid the activation of the POSCHANGE EVENT.

Yours


At 18 FEB 1999 09:24AM Oystein Reigem wrote:

Antonia,

I assume you must expect a POSCHANGED since you change SELPOS. Do you really want to change the selected cell to Prevxy? Or do you just want to set a value in the Prevxy cell?

- Oystein -


At 18 FEB 1999 02:00PM Cameron Purdy wrote:

See BLOCK_EVENTS.

Cameron Purdy

Revelation Software


At 18 FEB 1999 06:55PM Antonia Azpurua wrote:

Well I need to change the pos but I dont want the event script to work in some cases.

yours


At 19 FEB 1999 06:42AM Oystein Reigem wrote:

Antonia,

Probably Cameron's suggestion of using BLOCK_EVENTS is the easiest and most natural solution.

I've never used the BLOCK_EVENTS property myself. I haven't really been aware of it. If I had to solve your problem without BLOCK_EVENTS I think I would have used some kind of state variable. Whenever I knew the next POSCHANGED should not be executed I would set the state to something special. In the POSCHANGED handler I would check the state and if the state said I shouldn't do the usual POSCHANGED thing, I'd return rightaway. But not before resetting the state (because I assume the next POSCHANGED thereafter should be executed).

The state variable could e.g be in a user-defined property for the edit table.

(Perhaps you think this was an unnecessary reply since I believe Cameron's suggestion is best, but there must be cases where my method will work and BLOCK_EVENTS not.)

- Oystein -

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/b60a4f65de2c5a7a8525671c003fdb9b.txt
  • Last modified: 2023/12/30 11:57
  • by 127.0.0.1