Question
I have a broken bit of code, and am not sure how to debug it. I've looked at most of the
TWikiPreferences for both my home site and here, but haven't really detected differences that I expect to be significant (table color, borderwidth, extra plugins installed here, etc.)
I'm confused. Here, clicking the edit control turns my formulas into the numbers that they evaluate to, while at home, the formulas stay raw in the boxes during edit mode... my
EditTablePlugin version at home is 27 Feb 2004, same as here. My
TablePlugin is the same, at 01 Jan 2004, and my
SpreadSheetPlugin is just a little older, at 08 Mar 2004 vs 16 Mar 2004. (the change that was stated shouldn't have affected this bit...)
I plan to upgrade my
SpreadSheetPlugin, just to eliminate that possibility, but really, neither behavior is quite correct, by what I would like to happen. At home, if the table has more than three rows, pressing the "edit" button causes my browser to hang. No diagnostic information has been found so far. (other than that, at home it does what I expect... I can fiddle with the pulldowns & dates & save the table, etc.)
extra row to preserve the formulas from editclobber.
| 3 |
otherfood |
1 |
1 |
1 |
2004/03/17 |
7991 |
8012 |
In case you're wondering, it's a meal planning aid. Me and my wife will select how much we like a particular food, and when the last time we had it. A formula (under construction) will allow us to sort to the top the most appealing food that we haven't recently had. Obviously, I
could do this with excel or gnumeric on my local box, inaccessable from faraway places, but that wouldn't be as fun, now would it? (and other things of this type I'd like to do should REALLY be centralized, even those that contain private/proprietary information)
--
JohnGreenup - 19 Mar 2004
Answer
The
EditTablePlugin has a known limitation: Variables like
%WEB% or
%CALC{}% get expanded if placed in an edit field. If you are using formulae place them in label cells.
--
PeterThoeny - 20 Mar 2004
test of the other solution:
not quite sure how to construct a correct EDITTABLE-header line to add rows with the calculation properly;
if I put a nop in the calc, it puts the formula text (nopped) in the cell instead of the result of math (the working formula),
if I don't the cell gets nothing at all (the math is done in the header I guess, and the result of the math done there gets stuffed in the added row.)
--
JohnGreenup - 20 Mar 2004
As documented, to escape the rendering, use
$percnt for
% in the init part of the format. I fixed above example.
You could also omit the formulae in the table and do the calc after the table.
$ROW() points to the last row.
--
PeterThoeny - 20 Mar 2004
In the top example, where the row is seperated to protect the formulas from editclobber, you can put the added row inside html comment tags (<!-- -->) so that it won't be displayed.
--
ChrisHanley - 13 Sep 2007