Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

New log manager since rev. 4606

<< < (5/9) > >>

MortenMacFly:

--- Quote from: mandrav on November 13, 2007, 01:54:06 pm ---Doing this will make everything work as expected. You can try it, if you want :).

--- End quote ---
I can't believe it... Yiannis, you solved a major issue in a software I'm maintaining here at work. I had a singleton class as member variable inside another singleton class. The object got never initialised properly and I did an ugly hack to get it to work. But I was facing *exactly* that issue. You are the hero.
(Although it's really weired that nobody out there noticed this with all those millions of singleton template example code...)

thomas:
Hmm... can we simply move the instance into a .cpp file (one)? If I understand the problem right, that should work.

mandrav:

--- Quote from: thomas on November 13, 2007, 02:32:32 pm ---Hmm... can we simply move the instance into a .cpp file (one)? If I understand the problem right, that should work.

--- End quote ---

It probably would work, yes. But what would be the point? You 'd still have to #include all the managers there. So better to put each one in its own compilation unit (the appropriate manager's .cpp). It's just two lines of code. :)

I have already created the patch and sent it over to Morten for testing on windows. If all goes well, I 'll commit it.

mandrav:

--- Quote from: mandrav on November 13, 2007, 02:41:42 pm ---I have already created the patch and sent it over to Morten for testing on windows. If all goes well, I 'll commit it.

--- End quote ---

Tests were successful and changes committed :).

dje:
Hi all !

Feature request 3879 :
I need my log window to be removed from the logger without being destroyed.

In InfoPane class, we have:

--- Code: ---int InfoPane::AddLogger(Logger* logger, wxWindow* p, const wxString& title, wxBitmap* icon)
int InfoPane::AddNonLogger(wxWindow* p, const wxString& title, wxBitmap* icon)
bool InfoPane::DeleteLogger(Logger* l)
bool InfoPane::DeleteNonLogger(wxWindow* p)
bool InfoPane::RemoveNonLogger(wxWindow* p)

--- End code ---

User benefit from the following events for adding/removing logs:

--- Code: ---EVT_ADD_LOG_WINDOW
EVT_REMOVE_LOG_WINDOW

--- End code ---

I'd like:
- bool InfoPane::RemoveLogger(wxWindow* p) to be implemented
- the EVT_DELETE_LOG_WINDOW to be implemented
- the EVT_REMOVE_LOG_WINDOW event call InfoPane::RemoveLogger instead of InfoPane::DeleteLogger
- the EVT_DELETE_LOG_WINDOW event call InfoPane::DeleteLogger

I can do it if accepted.

Dje

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version