Re: Gtk::TreeView



The get_widget function you are calling to obtain your window pointer
from your Gnome::Glade::XML object does NOT return a pointer to the
requested widget.  Ergo, when you call delete on that pointer you are
getting indeterminate results.

/*Bob Caryl*
Fiscal Systems,Inc.
256.772.8920 Ext. 108
http://www.fis-cal.com <http://www.fis-cal.com/>/

/This email message may contain privileged or confidential information.
If you are not the intended recipient, you may not disclose, use,
disseminate, distribute, copy or rely on this message or attachment in
any way. If you received this email message in error, please return by
forwarding the message and its attachment to the sender and then delete
the message and its attachment from your computer.

Neither Fiscal Systems, Inc., nor its affiliates, accept any liability
for any errors, omissions, corruption or virus in the contents of this
message or any attachments that arise as a result of e-mail transmission./



Vladimir Đokić wrote:
> Hi all,
> 
> I've created UI for an app using glade, and now have problem with
> treeview/treemodel - have created tree view in glade also (code is just to
> illustrate):
> 
> class Foo
> {
> public:
>    Foo()
>    {
>        mWindow = xml->get_widget("window", mWindow);
> 
>        Gtk::TreeView* tree_view = NULL;
>        xml->get_widget("tree_view", tree_view);
> 
>        // Standard code for creating treemodel goes here (from gtkmm book
> example)...
>    }
> 
>    ~Foo()
>    {
>        delete mWindow; // <-- heap error
>        ... more delete code
>    }
> 
> private:
>    Gtk::Window* mWindow;
>    Glib::RefPtr<Gtk::TreeStore> mTreeStore;
> 
>    class Columns : public Gtk::TreeModel::ColumnRecord
>    { ... }
>    Columns mColumns;
> }
> 
> I'm using win32/glade 2.12 and vs2005.
> 
> Thanks,
> Vladimir.
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]