| Store | Cart

Re: [TCLCORE] [Ext] Re: [Pre-CFV] - RFQ - TIP 541: ttk::combobox current

From: Zaumseil René <RZau...@kkg.ch>
Tue, 14 May 2019 14:45:31 +0000
> -----Ursprüngliche Nachricht-----> Von: François Vogel [mailto:fvog...@free.fr]> Gesendet: Dienstag, 14. Mai 2019 14:29> An: Donald Arseneau <a...@triumf.ca>> Cc: tcl-...@lists.sourceforge.net> Betreff: [Ext] Re: [TCLCORE] [Pre-CFV] - RFQ - TIP 541: ttk::combobox current>>> ----- Mail original -----> De: "Donald Arseneau" <a...@triumf.ca>> À: tcl-...@lists.sourceforge.net> Envoyé: Mardi 14 Mai 2019 07:52:00> Objet: [TCLCORE] [Pre-CFV] - RFQ - TIP 541: ttk::combobox current>> > Was there thought put to making this ("end" index for ttk::combobox)> > truly symmetric with list indices, where "end-1" etc are also> > supported? It would be great if the internals were shared, to reduce future> divergence.>> This is actually a good question. Short answer is no, I didn't think about this so> far. But now I just did and here is what I can say about this idea.>> In Tcl, support for indices of the type "M+N", "M-N", "end-N", "end+N" was> added by TIP #176. TclGetIntForIndex was enhanced to support this syntax,> and the lists operations took advantage of it.>> In Tk, unless I missed something, no widget supports this syntax. At least> entry, spinbox, listbox, ttk:entry, ttk::spinbox, ttk::combobox do not. The> text widget neither supports this, however there are indices modifiers that> provide this feature but the programmer needs to specify the "unit" (chars,> lines, display lines...) of the offset. It's not just "end-3" for instance.> Moreover, spaces before or after the +/- sign are supported by the text> widget, which is not the case for list index arithmetic.>> Now taking advantage of TclGetIntForIndex() in Tk could be done, and then> we would propagate this to all Tk areas where it's useful (that is entry,> spinbox, listbox, ttk:entry, ttk::spinbox, ttk::combobox). Given that a. no> existing Tk widget already has this, b. we can do it later without breaking> compatibility and c. it's a quite larger project than what TIP #541 is targeting, I> suggest this to be the subject of another TIP. Also I believe this would mean> promoting TclGetIntForIndex() to the public interface as> Tcl_GetIntForIndex(), and then document it.>

Thank you for the detailed analysis!

Now my question:

Why do you feel the need to do the change in ttk::combobox now and not the change in all of tk?
The original ticket was from 2009.

Thank you
rene



Kernkraftwerk Goesgen-Daeniken AG
CH-4658 Daeniken, Switzerland

Diese Nachricht (inkl. Anhaenge) beinhaltet moeglicherweise vertrauliche oder gesetzlich geschuetzte Daten oder Informationen. Zum Empfang derselben ist (sind) ausschliesslich die genannte(n) Person(en) bestimmt. Falls Sie diese Nachricht irrtuemlicherweise erreicht hat, sind Sie hoeflich gebeten, diese unter Ausschluss jeder Reproduktion zu vernichten und den Absender umgehend zu benachrichtigen. Besten Dank.

_______________________________________________
Tcl-Core mailing list
Tcl-...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tcl-core
Recent Messages in this Thread
Donald Arseneau May 14, 2019 05:52 am
François Vogel May 14, 2019 12:29 pm
Zaumseil René May 14, 2019 02:45 pm
Jan Nijtmans May 15, 2019 03:03 pm
Donald G Porter via Tcl-Core May 15, 2019 03:10 pm
Donald Arseneau May 18, 2019 12:06 am
Messages in this thread