News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

duplicated cbEVT_EDITOR_ACTIVATED event?

Started by ollydbg, August 20, 2015, 04:55:31 PM

Previous topic - Next topic

ollydbg

Hi, I found that I have three cbEVT_EDITOR_ACTIVATED sent when I double click on a project tree file in the project manager panel.

See my log message here: Re: question about m_NeedsBatchColour variable in CC

Also, search the forum, we have discussed this issue before:

This one: Re: event sequence question? or that one: Puzzling cbEVT_EDITOR_* event behavior.

The duplicated events make writing plugin a little hard. Some caches are needed to only handle the editor event once(not three times)
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.