I'm looking for a way to allow fluid create an inner struct to wrap
members/methods of it, something like class bellow, and I found several
memory leaks in fluid, most of the string fields of the classes FL_Type
and descendants aren't released when the class is destroyed.
------- example of member variables that leak
class Fl_Type {
friend class Widget_Browser;
friend Fl_Widget *make_type_browser(int,int,int,int,const char *l=0);
friend class Fl_Window_Type;
virtual void setlabel(const char *); // virtual part of label(char*)
protected:
Fl_Type();
const char *name_; // never released on destruction
const char *label_; // never released on destruction
const char *callback_; // never released on destruction
const char *user_data_; // never released on destruction
const char *user_data_type_; // never released on destruction
const char *comment_; // never released on destruction
-------
------- example of a class generated by fluid with inner struct wrapping
membes/methods
class Outter : public Fl_Double_Window {
void _Outter();
public:
Outter(int X, int Y, int W, int H, const char *L = 0);
Outter(int W, int H, const char *L = 0);
Outter();
struct Inner { //<-- generated based on class name like
"Outter$Inner"
that will be splitted internally
int x_;
Fl_Input *resize;
int x() {return x_;};
void x(int ax) {x_ = ax;};
} inner;
};
-------
En 15/11/2010 22:22:52, Domingo Alvarez Duarte <[email protected]>
escribió:
> I'm facing a problem using fluid, I'm writing forms for view/edit
> database records I want to name the widgets used to show/edit field
> information with the same name as the database records, but sometimes
> those names can conflict with some parent class field/method names,
> ideally I want a kind of namespace for those fields and that can be don
> using an internal class/struct without any inheritance.
>
> -------- Done with fluid, the Fl_Input *resize conflict with
> Outter::resize(int, int)
>
> class Outter : public Fl_Double_Window {
> void _Outter();
> public:
> Outter(int X, int Y, int W, int H, const char *L = 0);
> Outter(int W, int H, const char *L = 0);
> Outter();
>
> class InnerAsNamespace {
> int innerID;
> };
> Fl_Input *resize;
> };
>
> -----------
>
> Actually fluid allow us to create a class inside a widget class but it
> doesn't allow create fields on this inner class with widgets.
>
> Can this problem be solved with another way ?
>
> On Delphi and Lazarus they have the possibility of visual form
> inheritance.
>
> Thanks in advance for any help !
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk