Re: Two warnings when creating a TreeStore
- From: José Alburquerque <jaalburquerque cox net>
- To: paul linuxaudiosystems com
- Cc: gtkmm-list gnome org
- Subject: Re: Two warnings when creating a TreeStore
- Date: Tue, 11 Sep 2007 17:03:22 -0400
Paul Davis wrote:
You shouldn't ever try to use global instances of Gtkmm objects. All
gtkmm objects need be created after the Gtkmm type system has been
initialized, which is done inside Gtk::init().
Either use a pointer or make it a member.
--p
I understand. I already do this. I just didn't want to post all the
details of my programming. For your peace of mind, my initialization
code looks like the following:
int
main (int argc, char *argv[])
{
Gtk::Main kit(argc, argv);
MainWindow mainWindow;
DVDProject* p = new DVDProject("/tmp", "jose");
// mainWindow.setProject(*p);
kit.run(mainWindow);
return 0;
}
The DVDProject constructor is in charge of creating the TreeStore in the
following way:
DVDProject::DVDProject(const ustring& parentDir, const ustring& name) {
this->parentDir = parentDir;
this->name = name;
treeStoreRef = TreeStore::create(DVDProject::columns);
}
The DVDProject::columns is simply defined as:
Columns DVDProject::columns;
Any ideas? Thanks so much.
Sincerely
-Jose
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]