POSCHANGE after CHANGE (None Specified)
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 -