> I put together the following code for test purposes, it is 
> not a full implementation with error checking etc or a final 
> design, it just lets me practice with some of the elements i 
> will need. it compiles fine  i just renamed some of the 
> variables before posting, i can't compile and test in work, 
> so excuse any typos i will update any that remain but i think it's ok.

Your code doesn't compile for me - there are a couple of issues. I
bodged around to get what I thought you meant, but...

Anyway, they main stopper (apart from the absence of the #include lines
you are using) is that gcc complains that the variable "Reset" is
ambiguous - you have a button widget and a void function with the same
name declared in your class and gcc does not like it when it is
subsequently called and can't be uniquely resolved.

I changed the name of the function (and the places from which it is
called) to reset_fn.


The other possible issue is that your outer function "SetupTest" does
not derive from Fl_Widget (or better Fl_Window), yet in your callback's
you are casting the widget parent to an Fl_Widget...

Now, the parent of the button widget is almost certainly the containing
window, not the SetupTest object, so subsequent references to the "this"
will probably be nonsense.

You need to sort out your widget hierarchy and the parent/child
relationships and then see what does or doesn't work, I think...




SELEX Galileo Ltd
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 
3EL
A company registered in England & Wales.  Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to