From: Patrick E. <pa...@pa...> - 2004-03-26 07:30:58
|
On Thursday 25 March 2004 13:49, joakim verona wrote: > dialog.Attach("scale", &scale); > dialog.Attach("clockDelay", &clockDelay); > dialog.Attach("repeat", &repeat); I implemented int* versions of the Attach methods. I also added support for wxSlider. I didn't test any the recent changes, so it may not work. I really need to head to bed. > It fails, because there are only long* prototypes of Attach. > Is this so by design or because floats havent been implemented? > > I suspect it's by design, because I couldnt find a "double" capable > slider either. > > I could of course use longs in the gui, and convert to double when > sending to the command object. Another possibility is adding Attach methods like this: Attach(wxString name, double *ptr, double divisor); When the values come out of the slider it automatically performs the division for you. The sliders could be phrased in terms of percent or something like that. The XRC resource controls the range and labels on the slider. Another possibility would be implementing our own double capable sliders. Probably wouldn't be too hard, but not a trivial task either. Patrick |