Yeah, good joke :) But, if about me, in programs I prefer always 0 :) And, considering that I'm the sole author of this code, I expect it to count things so as want I, not others :)
So, how could I make it to count always from 0?.. | [reply] |
my $startpoint = 0; my $endpoint = 99;
if ( $type eq 'row ){ $startpoint =1, $endpoint = 100 }
foreach my $field ( $startpoint..$endpoint
.....
.....
I was musing over it last night, and guessed it has to do with column headers getting counted as a row, maybe ? :-)
As to Tk having one author, it's not true IIRC. Tk is just a Perl port of TCL/Tk, and TCL/Tk was a hodgepodge collection of widgets, written by different groups, with no true 1,0 coherence to some programming style standards. So different widgets, can have methods which are not consistent across widget families.
Tk was just meant to be easy to use. If you want some real consistency in widget design, move up to Perl-Gtk2. All of it's widgets descend from well laid out ancestors, so the style remains the same across widgets.
Plus, the original author of Tk, Nick Simmons is gone to bit heaven, and Mr. Reszic who knows enough to
handle the module, is a very busy man and dosn't support the old Tk with full time vigor. However, he might look at that as a bug, file a bug report. He will probably say that fixing it in the c code, will break something else, so just hack around it, with a few lines of code.
| [reply] [d/l] |
Thank you for your reply, Zentara.
>I was musing over it last night, and guessed it has to do with column headers getting counted as a row, maybe ? :-)
When I commented out the code constructing column headers, nothing changed.
>If you want some real consistency in widget design, move up to Perl-Gtk2. All of it's widgets descend from well laid out ancestors, so the style remains the same across widgets.
Unfortunately, I have no enough time to study Gtk2. It's already more than a year that I'm writing this gui on Tk (in free time by evening); imagine how much time will it take from me - total rewriting all the code :)
>so just hack around it, with a few lines of code.
Yes, I'll do it. I have already begun to do it, before creating this page on perlmonks, but then I thought, may be it's not a bug, may be I don't understand something...
| [reply] |