Re: [TCLCORE] The end for Tcl_PrintDouble in Tk?
by Joe English other posts by this author
May 20 2009 9:56AM messages near this date
Re: [TCLCORE] The end for Tcl_PrintDouble in Tk?
|
Re: [TCLCORE] The end for Tcl_PrintDouble in Tk?
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
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables
unlimited royalty-free distribution of the report engine
for externally facing server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Tcl-Core mailing list
Tcl-Core@[...].net
https://lists.sourceforge.net/lists/listinfo/tcl-core
Thread:
Jeff Hobbs
Joe English
dgp
Jeff Hobbs
Joe English
Michael Kirkham
Joe English
Jeff Hobbs
|