Author Topic: some events issued twice  (Read 5003 times)

Offline mikmik25

  • Single posting newcomer
  • *
  • Posts: 3
some events issued twice
« on: August 08, 2008, 02:51:24 am »
Hi there.
I have been working and developing plugins for C::B for half year.

During study code for adding new functionality I have found some events issued twice in short period of time.

for example cbEVT_PROJECT_TARGETS_MODIFIED.

void ProjectOptionsDlg::OnAddBuildTargetClick(wxCommandEvent& event)

calls m_Project->AddBuildTarget(targetName) 

ProjectBuildTarget* cbProject::AddBuildTarget(const wxString& targetName)
issue this event

after call returned back to OnAddBuildTargetClick()  it also issue this event

I'm using revision 4561
I have checked the code revision CB 8.2 - same problem

I was trying to find cbEventsDisplay plugin to trace what is going on with other events I'm interested in.
But it looks like it's store time is ended.
Is this plugin alive or I have to write my on?

Thank you
Konstantin

Offline mikmik25

  • Single posting newcomer
  • *
  • Posts: 3
Re: some events issued twice
« Reply #1 on: August 08, 2008, 07:52:47 pm »
should such behavior considered as right ?

where I could find cbEventsDisplay plugin ?

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: some events issued twice
« Reply #2 on: August 08, 2008, 08:28:15 pm »
should such behavior considered as right ?

where I could find cbEventsDisplay plugin ?


I created a similar plugin as quick hack.

You can download the source from http://apt.jenslody.de/patches/DisplayEvents.zip http://apt.jenslody.de/patches/DisplayEvents_0_2.zip.
It has to be build from inside C::B's source tree (create "src/plugins/contrib/DisplayEvents" and put files inside).
It can be build with codeblocks-development headers installed. That means it should work without the need to download full svn-source-tree.


It only shows the time when the event occurs and the type of the event (registered with "RegisterEventSink(..)") atm.

As I said it's just a quick hack, but you can try it if you want.

And you need to start codeblocks with "-d" option, or from console to see the output (it goes to C::B's debug-log).

Only tested and compiled on linux, might need some tweaks to work on win.
« Last Edit: August 09, 2008, 12:42:45 am by jens »

Offline mikmik25

  • Single posting newcomer
  • *
  • Posts: 3
Re: some events issued twice
« Reply #3 on: August 11, 2008, 07:54:05 pm »
Thank you for the contribute.
I wrote my own exactly like yours :) just w/o separation on event by category

I'm going to submit bug on berlios' bugtracker with gathered data

Thank you
Konstantin