News:

BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

NoEventsPending and CellChange events

Started by perry59, June 09, 2022, 07:55:07 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

perry59

I have a function which changes several bits of data on a shape. Naturally this fires the CellChange event which I listen for but in this case I want to ignore. In other similar cases I just set a global variable called "IgnoreCellChange" which I watch for in my CellChange handler and if set I exit the sub.
In this particular case though, the data I am changing is taking place within my NoEventsPending handler. It seems that the CellChanged events do NOT fire when the NoPendingEvents handler is active, they fire AFTER the NoPendingEvents handler has completed so setting my ignore flag is useless. That means I am doing extra processing which is not needed.
So, the gist of the question is, is this typical behavior, the cell change events do NOT fire from within a NoPendingEvents handler but are delayed until after?
Thanks
what, me worry?

Paul Herber

I suspect that events do not fire within an event handler. That could cause very deep or even infinite recursion into the event handlers.
Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/

perry59

#2
Quote from: Paul Herber on June 11, 2022, 10:24:49 AM
I suspect that events do not fire within an event handler. That could cause very deep or even infinite recursion into the event handlers.
Agreed, there is potential for disaster there. Still trying to find a work around though.
Thought about just setting a timer and doing my shape changes a couple seconds after the previous events conclude, but for some reason when I create a timer object my addin will not load.
Perry
what, me worry?

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 177 (show)
Files included: 32 - 1207KB. (show)
Memory used: 2068KB.
Tokens: post-login.
Cache hits: 13: 0.00191s for 26,723 bytes (show)
Cache misses: 3: (show)
Queries used: 17.

[Show Queries]