Problem with xml form and two arrays

wh <[email protected]>
Newsgroups gmane.comp.lang.4gl.aubit.general
Message-ID <[email protected]>
Hello,

if you create a form with two arrays, fcompile -xml builds only one 
table instead of two:

example:
t1.per
<<<
database formonly
screen
{
[f1   ]
[f1   ]
[f1   ]
[f2   ]
[f2   ]
[f2   ]
}

attributes
f1 = formonly.f1;
f2 = formonly.f2;

instructions
screen record s1[3] (f1);
screen record s2[3] (f2);
>>> 

after a fcompile -xml -f1.per you got:

<<<
<?xml version="1.0" encoding="utf-8"?>
<Form name="f1.afr" sqlDbName="formonly" width="7" height="7" 
delimiters="[]|" encoding="">
<VBox >
<Table pageSize="3" tabName="s1" >
<TableColumn name="formonly.f1" colName="f1" fieldId="0" 
sqlTabName="formonly"  sqlType="CHAR(5)" tabIndex="1">
   <Edit width="5"  />
</TableColumn>
<TableColumn name="formonly.f2" colName="f2" fieldId="1" 
sqlTabName="formonly"  sqlType="CHAR(5)" tabIndex="2">
   <Edit width="5"  />
</TableColumn>
</Table>
</VBox>
<RecordView tabName="formonly">
    <Link colName="f1" fieldIdRef="0"/>
    <Link colName="f2" fieldIdRef="1"/>
</RecordView>
<RecordView tabName="s1">
    <Link colName="f1" fieldIdRef="0"/>
</RecordView>
<RecordView tabName="s2">
    <Link colName="f2" fieldIdRef="1"/>
</RecordView>
</Form>
>>> 

So there is not table with tabName="s2"! but instead the columns of the 
secound table are added to the first.


If you insert a line with any content (but not a empty line) between the 
two arrays, the xml is correct:
<<<
database formonly
screen
{
[f1   ]
[f1   ]
[f1   ]
x
[f2   ]
[f2   ]
[f2   ]
}

attributes
f1 = formonly.f1;
f2 = formonly.f2;

instructions
screen record s1[3] (f1);
screen record s2[3] (f2);
>>> 

and you get:
<<<
<?xml version="1.0" encoding="utf-8"?>
<Form name="f1.afr" sqlDbName="formonly" width="7" height="8" 
delimiters="[]|" encoding="">
<VBox >
<Table pageSize="3" tabName="s1" >
<TableColumn name="formonly.f1" colName="f1" fieldId="0" 
sqlTabName="formonly"  sqlType="CHAR(5)" tabIndex="1">
   <Edit width="5"  />
</TableColumn>
</Table>
<Grid width="1" height="4" >
<Label text="x" posY="3" posX="0" gridWidth="1" guessAlign="L"/>
</Grid>
<Table pageSize="3" tabName="s2" >
<TableColumn name="formonly.f2" colName="f2" fieldId="1" 
sqlTabName="formonly"  sqlType="CHAR(5)" tabIndex="2">
   <Edit width="5"  />
</TableColumn>
</Table>
</VBox>
<RecordView tabName="formonly">
    <Link colName="f1" fieldIdRef="0"/>
    <Link colName="f2" fieldIdRef="1"/>
</RecordView>
<RecordView tabName="s1">
    <Link colName="f1" fieldIdRef="0"/>
</RecordView>
<RecordView tabName="s2">
    <Link colName="f2" fieldIdRef="1"/>
</RecordView>
</Form>
>>> 


Walter

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.