|
From: Paulo M. <po...@sa...> - 2005-09-09 08:45:18
|
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.
>
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.
Cheers,
Paulo Matos
> 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[] = {"Plugin Name"};
>
> tree = 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) =
> &get_plugin_info;
> ewl_callback_append(tree, EWL_CALLBACK_CLICKED, treecb, tree);
> for(map<string, string>::const_iterator it = plugins.begin();
> it != plugins.end(); ++it) {
> const char *name = (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 = EWL_TREE(data);
> Ewl_Row * row = (Ewl_Row *)
> ecore_list_goto_first(ewl_tree_selected_get(tree));
> Ewl_Text * txt = (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
>
>
--
Paulo Jorge Matos - pocm at sat inesc-id pt
Software and Computer Eng.
Web : http://sat.inesc-id.pt/~pocm
INESC-ID - SAT Group
|