Re: CTree "tree-expand" signal



On Saturday 02 June 2001 12:35 pm, faboo wrote:
I've been having this very odd problem for a while now: I've got a GtkCTree,
'folders', and when the user opens a node (expands that branch) I need to do
some work. Now, I have a function connected to the "tree-expand" signal,
who's declaration looks like this:

void foldersCTreeTreeExpand(GtkCTree *folders, GList *nodeList, gpointer
       object);

Getting the signal and such goes just fine. Problems arise, however, when I
try to use 'nodeList' argument, which should be a pointer to the GList
inside of the just expanded GtkCTreeNode structure. If I convert 'nodeList'
to a GtkCTreeNode using the GTK_CTREE_NODE() macro, and then try and use
the results as a parameter to a function function, the results range from
incorrect data, to a segmentation fault and a program crash.
Is there something I'm missing about the 'GList *nodeList' parameter of this
signal and there is some other way I need to extract its corresponding
GtkCTreeNode?

I've also come accross this same problem with the "tree-select-row" signal of
the GtkCTree. Specifically, when the signal is called, I call a function to
get text from the row, like so:
<code>
void CTreeTreeSelectRow(GtkCTree *folders, GList *nodeList, gpointer object){
        char *text;
        gtk_ctree_node_get_text(folders, GTK_CTREE_NODE(node), 0, &text);
</code>
This call returns false, and 'text' is not filled. (This error showed up in
1.2.8 and 1.2.10)
Any thoughts anybody?

faboo
--
"and fuck moments                       "There was nothing to fear
I want an hour to once again be         And nothing to doubt"
a long time."                           -Pyramid Song,
        -Out Loud,                              Radiohead
        Tim Mason




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