>
> On 6 Jun 2009, at 17:01, andrei_c wrote:
>
> > Hello everyone!
> >
> > As the title implies I am having a bit of a problem regarding how
> > to "comunicate" between multiple widgets.
> >
> > As an example, I wanted to make a program that has one button and
> > some other widgets who's properties should change when the button
> > is pressed.
> > As you know, to do this I must make a special callback function
> > which must be called inside the "callback" method of a
> > widget.Something like this:
> >
> > button_1.callback(button_cb,some_data)
> >
> > The button_cb is a function I have to make myself and in every
> > tutorial it seems to be like:
> > void button_cb(Fl_Widget *w, void *v)
> >
> > Those to input parameters, *w and *v can then be used to "obtain"
> > the widgets you need by casting.What this theoretically means is
> > that i can only comunicate between maximum 3 widgets:
> > -the widget that triggers the callback
> > -and other 2 widgets via casting from *w and *v



>
> This is probably the wrong way to approach this problem.
>
> It might be useful if you could describe what you are actually trying
> to achieve, rather than describing (in considerable detail, I must
> say!) the problems you encountered with this approach.
>
> It is likely that, if we know where you are going to, we might be
> able to suggest other ways to get there that will help you!
>
>
>

Hi imacarthur!
Well, I was just presenting how I came upon a weird behavior just because I 
needed multiple widgets callbacks.And there is also part 2 in which I admit 
that the first approach wasn't good.But I was describing how I encountered such 
a weird behavior.It might be my bad C++ skills but I don't understand why the 
behavior presented in part 1 happens.Does anyone know why it happens???
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to