From: Joe E. <jen...@fl...> - 2009-05-20 16:54:29
|
Michael Kirkham wrote: > > This may not be a direct opinion as to your specific question, but both of > those look (IMHO) like throwbacks from the days before objects. Assuming > the precision change isn't an issue, why wouldn't you use... > > EntryVisibleRange(entryPtr, &first, &last); > objPtr = Tcl_DuplicateObj(entryPtr->scrollCmd); > Tcl_ListObjAppendElement(interp, objPtr, Tcl_NewDoubleObj(first)); ^^^^^^^^^^^^^^^^^^^^^^^^ Because the -[xy]scrollcommand is a script prefix (i.e., a string), not a command prefix (i.e., a list). In the vast overwhelming majority of cases, -[xy]scrollcommand is indeed a proper list, but it's also possible to do stuff like: listbox .l -yscrollcommand { puts "I've been scrolled!" ; .sb set } --Joe English |