Storring value in treeview




Hi,
Simple example:
class myclass {
enum MyType {
None = 0,
Firsttype ,
Secondtype
};
}

I have a class member that returns MyType. Let's call it get_type (). 
Some code exame:
void myfunc (sometype obj)
{
Gtk::TreeModel::Row row =*(m_refTreeView-> get_selected ());
row[m_columns.m_type] = obj.get_type ();
// checking code
std::cout << "1typ is " << obj.get_type () << std::endl;
std::cout << "2typ is " << row [m_columns.m_type]  << std::endl;
}
m_columns.m_type is MyType type.
I don't understand,  why I see different outputs. In the first case I have the correct value 1 or 2, while in thesecond one I see a random value 86363773. 

I have many columns and have no problems with them. 
Could you please clarify what I missed. Let me know if you need more information.
-Pavlo.
Thanks.


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