return node->m_title;
}
+wxString MyMusicTreeModel::GetArtist( const wxDataViewItem &item ) const
+{
+ MyMusicTreeModelNode *node = (MyMusicTreeModelNode*) item.GetID();
+ if (!node) // happens if item.IsOk()==false
+ return wxEmptyString;
+
+ return node->m_artist;
+}
+
int MyMusicTreeModel::GetYear( const wxDataViewItem &item ) const
{
MyMusicTreeModelNode *node = (MyMusicTreeModelNode*) item.GetID();
}
int MyMusicTreeModel::Compare( const wxDataViewItem &item1, const wxDataViewItem &item2,
- unsigned int column, bool ascending )
+ unsigned int column, bool ascending ) const
{
wxASSERT(item1.IsOk() && item2.IsOk());
// should never happen