From: Nathan I. <nin...@gm...> - 2005-09-09 13:26:04
|
Right, we've been talking about some ideas to make the tree easier to use= =20 and access the data in it. On 9/9/05, Paulo Matos <po...@sa...> wrote: >=20 > Nathan Ingersoll wrote: > > There is a lot of reparenting happening inside of the tree, so you may > > be accessing a cell in the tree. Try printing > > ewl_widget_appearance_get(EWL_WIDGET(txt)); to see the type of widget > > you are accessing. > > >=20 > But this is only happening because Ewl is in devel right? > Hopefulle, after reaching stable, there will be no need for that, > right? (since we will hopefully know in advance what we should > get from ewl_row_column_get. >=20 > Cheers, >=20 > Paulo Matos >=20 > > On 9/8/05, *Paulo Jorge de Oliveira Cantante de Matos* > > <po...@sa... <mailto:po...@sa...>> wrote: > > > > Need to get the label of the tree row I just clicked on: > > > > char *treeheaders[] =3D {"Plugin Name"}; > > > > tree =3D ewl_tree_new(1); > > ewl_tree_headers_set(EWL_TREE(tree), treeheaders); > > ewl_container_child_append(EWL_CONTAINER(treecont), tree); > > void (*treecb)(Ewl_Widget *w, void *event, void *data) =3D > > &get_plugin_info; > > ewl_callback_append(tree, EWL_CALLBACK_CLICKED, treecb, tree); > > for(map<string, string>::const_iterator it =3D plugins.begin(); > > it !=3D plugins.end(); ++it) { > > const char *name =3D (it->first).c_str(); > > ewl_tree_text_row_add(EWL_TREE(tree), 0, (char **)&name); > > } > > ewl_widget_show(tree); > > > > > > In callback function get_plugin_info: > > Ewl_Tree * tree =3D EWL_TREE(data); > > Ewl_Row * row =3D (Ewl_Row *) > > ecore_list_goto_first(ewl_tree_selected_get(tree)); > > Ewl_Text * txt =3D (Ewl_Text *) ewl_row_column_get(row, 0); > > std::cout << "Clicked on " << ewl_text_text_get(txt); > > > > This does not work. > > > > Any ideas why? > > > > Cheers, > > > > -- > > Paulo Jorge Matos - pocm at sat inesc-id pt > > Web: http://sat.inesc-id.pt/~pocm > > Computer and Software Engineering > > INESC-ID - SAT Group > > > > > > > > ------------------------------------------------------- > > SF.Net email is Sponsored by the Better Software Conference & EXPO > > September 19-22, 2005 * San Francisco, CA * Development Lifecycle > > Practices > > Agile & Plan-Driven Development * Managing Projects & Teams * > > Testing & QA > > Security * Process Improvement & Measurement * > > http://www.sqe.com/bsce5sf > > _______________________________________________ > > enlightenment-devel mailing list > > enl...@li... > > <mailto:enl...@li...> > > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > > > > >=20 >=20 > -- > Paulo Jorge Matos - pocm at sat inesc-id pt > Software and Computer Eng. > Web : http://sat.inesc-id.pt/~pocm > INESC-ID - SAT Group > |