Re: [glade--]Patches related to "Make Separate Class"
- From: Christof Petig <christof petig-baender de>
- To: Björn Axelsson <gecko acc umu se>
- Cc: glademm-list gnome org
- Subject: Re: [glade--]Patches related to "Make Separate Class"
- Date: Thu, 19 Dec 2002 09:55:52 +0100
Björn Axelsson schrieb:
Hello again,
I ran into a couple issues when trying to divide parts of my
ui into separate classes (but still in the same file). Here are my fixes.
They are not tested with separate classes in separate files, but works
fine if the classes are in the same file.
Cxx_Fileset.hh
- The user classes' header files needs to be included in order to use
those classes. (This actually gives an ugly cross dependency, but I
can't think of another simple fix right now...)
doesn't
void Class::GHInclude(const Widget &w, CxxFile &f) const
properly take care of this? I might have broken it unintendedly by the
virtual callback change.
Later: Ok. I see. separate file works because of this, separate class
not ... I'll look into it.
const_contained_iterator.cc
- For some strange reason did not the check for external classes work
when generating the top class, so the widgets were generated twice,
once for the separate class and once for the encapsulating class.
There were two problems with this. First of all does not the
ti_w->getBool(CXX_SEPERATE_CLASS) work, it always returns false.
Second, there was need for more checks of this flag (I might have
struck some special case that was originally overlooked).
My fix is not very beautiful, as I build a temporary Widget object from
the tag structure, just to read its CXX_SEPERATE_CLASS property instead
of reading it directly from the tag structure. But I could not find
the bug in the tag related classes, so this works mostly as a temporary
fix. I am also not very confident with the added property check.
I hope Petig has the time to verify it. (It would help if the code was
just a little bit better documented :-)
Critic Accepted. But I other projects drag me away. :-(
widget.cc
- This is totally unrelated... gcc 3.0 refuses to compile the newest
version of this file, as you try to modify a const string. My fix is to
choose the string contents at initialization time instead.
I double checked your mail for an attachment. I didn't find one.
I'll try myself with a separate class (separate file works, doesn't it).
Christof
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]