Re: pointer scope issues



gtk-devel-list is for discussion of the development of GTK+
itself. Not for questions about how to program in GTK+. You should
send this message to gtk-list or gtk-app-devel-list.

See:

 http://www.gtk.org/mailinglists.html

Thanks,
                                        Owen

Najati R Imam <nrimam0@pop.uky.edu> writes:

> I've recently started playing around with gtk and in the two things I've tried
> to do I think I've come across the same problem. I'll use the second as my
> example:
> 
> I set up a struct node that contains a data variable and a prev and next
> pointers to other node and a pointer to the widget that I need to modify. its a
> really simple 2xlinked list class that, but thats all I need and I've written a
> hundread of these thing and am positive I'm doing it right. But it seems that
> whenever I call the callback the makes a new one (at the "clicked" of a button)
> it goes and makes the new one, sets it up right and advanced the current
> pointer (which I am passing as the user data in the callback) and then when it
> leaves it forgets it.
> 
> So it seems pretty obvious to me that the scope on my user data (current) isn't
> right but I can't find anything that should work more then what I have that
> doesn't segfault. Is there something funny with callbacks that I wouldn't know
> from plains old c/c++ scope?
> 




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