Phantom fields in single-line screen array gives spurious error

Started by Andrew C., June 17, 2010, 05:54:14 AM

Previous topic - Next topic

Andrew C.


The following style of code results in a form compile error:

Code (genero) Select

database formonly

layout
grid
{
  [A1    ][A2        ]
}
end
end

attributes

phantom formonly._seqno type integer;

A1 = formonly.key type integer;
A2 = formonly.value type char;

instructions

screen record pha[1] (formonly._seqno, formonly.key, formonly.value)


however if the [1] is changed to [2] (plus adjust the grid to have another row) the error does not happen.

Contents of the .err file is:

Code (genero) Select

screen record pha[1] (formonly._seqno, formonly.key, formonly.value)
# At least one member of the SCREEN RECORD 'pha' must not be a PHANTOM field.
# See error number -6831.


Version of BDL is 2.20.09

Sebastien F.

Andrew,

May I suggest that you give a try to version 2.21?
I cannot reproduce the error with 2.21.06 ...

Seb

Andrew C.

OK, I'll have a try. We're planning to release with 2.20 since we've been developing using it for the last 6 months. However we've got at least 4 months to go before that release so it's probably a good idea to jump forward now before it's too late.

Anyway, I'll let you know how the test goes on the little demo program and my real ones! The demo code was trivial so your result is quite clear-cut, I expect I'll see the same