Subject: | yview without args in HList returns scalar, not list |
Seems to be an ancient bug. Just stumbled across this and found a
posting on comp.lang.perl.tk from Feb 5 2001, 9:18 pm: "HList->yview()
return value" "POD claims that $hlist->yview() with no arguments should
return 2 fractions like Listbox. However, it actually returns an
integer (in screen units) corresponding to how far the list has been
scrolled."
I'm not very good in reading Tk's c-code but it looks to me like
if (argc == 0) {
Tcl_IntResults(interp, 1, 1, wPtr->topPixel);
return TCL_OK;
}
in tixHList.c is wrong and should be more like the code in tixGrid.c :
if (argc == 0) {
char string[100];
double first, last;
GetScrollFractions(wPtr, &wPtr->scrollInfo[axis], &first, &last);
Tcl_DoubleResults(interp,0,2,"%f %f",first, last);
return TCL_OK;
}