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

wxFlatNotebook update + Patch

<< < (4/7) > >>

mandrav:
As I expected, the patch doesn't work correctly. That's why I wanted to test it myself.
Steps to reproduce the bug:

1) Right-click on "Build messages".
2) Select "Show/hide->Build log".

The build log hides.

3) Right-click on "Build messages".
4) Select "Show/hide->Build log".

The build log shows again and, seemingly, gets the focus. But still the "Build messages" is displayed.

5) Left-click on "Build messages" and enjoy.

thomas:

--- Quote from: yop on May 05, 2006, 06:20:08 pm ---Also it's totaly legal to "delete" a null pointer. All the problems arise from the fact that including myself many forget to set the pointer to null after deletion.
--- End quote ---
Right. Actually everybody should use something like this all the time:

--- Code: ---template<typename T> void Delete(T *p) {delete p; p = 0;};
--- End code ---

Hmm... I really wonder why nobody does that. Something must be fundamentally wrong with this, that would be just too simple...  :?:

One could use reference counted smart pointers to avoid above problem, too, of course.
If fact, I believe an object having a Destroy() function should necessarily be reference counted - if it only wraps around a plain normal delete, then it is actually not of much use to have such a function.

yop:

--- Quote from: thomas on May 05, 2006, 07:26:24 pm ---...Something must be fundamentally wrong with this, that would be just too simple...  :?:

--- End quote ---
Well there is http://public.research.att.com/~bs/bs_faq2.html#delete-zero but still deleting and setting to 0 should cover 99.99% of the cases.

MortenMacFly:

--- Quote from: mandrav on May 05, 2006, 06:22:10 pm ---Steps to reproduce the bug:

--- End quote ---
...confirmed. But: How strange is that? I don't even understand what's happening (to be honest) - where is this space coming from suddenly? :shock:
Anyway: I expected that testing is required - that's why I did not file a patch to BerliOS in the first place. Forgive me, but for my "daily work" it really works properly. But I have to admit that the only thing I'm closing/opening are code files - the lower layout I keep as it is normally.
With regards, Morten.

MortenMacFly:
...alright, I've tried to track down this issue nearly the whole day without success. In my humble opinion this is a very weird bug and from the changes done from 0.90 to 1.30 I really don't understand why and where this bug was introduced. Anyway, I'm not an expert in wxWidgets which makes things for me even worse. If anybody could at least give me a hint... that would be really helpful. I'm closing for today (tonight ;-)), maybe I seee more clear tomorrow... :|
With regards, Morten.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version