Tags:
create new tag
view all tags

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.)

Nr food J Pref M Pref A Pref Timestamp offset total
1 hot dogs 3 3 3 2004/03/17 7991 2671.33333333333
2 hamburgers 2 3 2.5 2004/03/17 7991 3205.4
3 Spaghetti 2 2 2 2004/03/07 8001 4011.5

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:

Nr food J Pref M Pref A Pref Timestamp offset total
1 hot dogs 4 4 4 2004/03/17 7991 2003.75
2 hamburgers 2 3 2.5 2004/03/17 7991 3205.4
3 Spaghetti 2 2 2 2004/03/07 8001 4011.5
4 sushi 1 4 2.5 2004/02/02 8035 3223
5 Brownie (points!) 2 2 2 2004/03/26 7982 4002

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

Edit | Attach | Watch | Print version | History: r10 < r9 < r8 < r7 < r6 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r10 - 2007-09-13 - ChrisHanley
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.