RE: [Plib-devel] puSlider
Brought to you by:
sjbaker
From: Fay J. F C. AAC/W. <joh...@eg...> - 2000-08-15 13:35:56
|
The problem Dave found was that there is an ambiguity between the original puSlider constructor with "vertical" specified and the new puSlider constructor with "vertical" left as a default. If the user creates a new puSlider object with four integer arguments, the compiler doesn't know which constructor to call. Another way to fix this might be to change the type of the variable "vertical". It only takes the values TRUE and FALSE, so making it "short" should work. Unfortunately, this could create confusion if the user creates a puSlider with four integer numbers: the computer would know exactly which constructor it is calling, but the user wouldn't be able to tell easily without an explicit type casting. A second alternative would be to make it "bool", but nothing else in PUI is "bool" and I don't know how portable it is. John F. Fay joh...@eg... -----Original Message----- From: Dave McClurg [mailto:Dav...@dy...] Sent: Monday, August 14, 2000 18:53 To: 'pli...@li...' Subject: RE: [Plib-devel] puSlider Blake Friesen wrote: > I would like to be able to use a puSlider that I can set the > width (for horizontal slider) or the height (for a vertical > slider.) Right now, the slider height is set according to > the height/width of the current font. Thanks Blake! I got an "ambiguous constructor error" on MSVC so I removed the default parameter to make it work puSlider ( int minx, int miny, int sz, int vertical = FALSE ) puSlider ( int minx, int miny, int sz, int width, int vertical ) Let me know if that is a problem. --Dave |