Here's a headbanger for you!
Or perhaps there's just something blindingly obvious that I can't see ...

Using v17r5

I have some code which loops through a selection of records and builds a
table by adding data to the cells in a 2-D array.
If a certain flag has been set, a CellStyle tag is added to the relevant
cell in the ptra2tCellStylesBody-> array.In this test, it's looping through
30 records and so creating 30 rows in the table.
The first 2 times through the loop, when it encounters a cell style tag,
the appropriate text is set in the appropriate table cell.
After that, it DOES NOT WORK!

Here's the code:

*Case of*

*:* (tTableCellStyleOverride#"")  // 02/10/19

$t:="<CellStyle:"+tTableCellStyleOverride+">"

*Case of*   // 04/10/19

*:* (($hbf="h") & (ptra2tCellStylesHeader->{$row}{$ElementOrder}#$t))

ptra2tCellStylesHeader->{$row}{$ElementOrder}:=$t

*:* (($hbf="b") & (ptra2tCellStylesBody->{$row}{$ElementOrder}#$t))

ptra2tCellStylesBody->{$row}{$ElementOrder}:=$t

*:* (($hbf="f") & (ptra2tCellStylesFooter->{$row}{$ElementOrder}#$t))

ptra2tCellStylesFooter->{$row}{$ElementOrder}:=$t

*End case*

tTableCellStyleOverride:=""  // clear it for the next one

So the first 2 times through, when $hbf="b" and ptra2tCellStylesBody->{$row
}{$ElementOrder}#$t, it populates the cell:
ptra2tCellStylesBody->{$row}{$ElementOrder}:=$t

Subsequently, it just pops through the Case statement and doesn't populate
the cell, even though those 2 test are both True.

I've uploaded some screenshots here:
https://www.dropbox.com/sh/6em5gfksy1h3kcx/AABhLa1x3-wRLg1GS7FicMhka?dl=0

4D001.png shows the state of play first time through the loop.
4D002.png shows the state of play second time through the loop.
4D003.png shows the state of play 13th time through the loop.

(it skips this section for rows 3 through 12 as they don't contain the
table cell style).

In all cases the two tests evaluate to True.
What can't I see?

PB

-- 
*************************************************
CatBase - Top Dog in Data Publishing
tel: +44 (0) 207 118 7889
w: http://www.catbase.com
skype: pat.bensky
*************************************************
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to