Finally a solution developed for my self-inflicted problem, how to find
out the *real* visibility of searched fields of a stack where some of
the fields were invisible - although their vis was "true" - because they
were part of an invisible group. The search proceeds in a double
repeat-loop for cards and fields, which contributed to the problem
probably because of the number of neccessary "of"-nestings. Here the
vis-checking part of the script:
"if the visible of fld j of cd i of the topstack is false
then put Return&"This field is not visible" after last char of
SearchResult
if word 1 of the owner of fld j of cd i of the topstack is
"group" then
put the owner of fld j of cd i of the topstack into
foundgroup
put word 2 of foundgroup into Word2
if Word2 = "id" then # "id" must be in lower case in case
"case-sensitive" is activated
put word 3 of foundgroup into IDNumber
if the vis of group ID IDNumber of cd i of the topstack is
"false"
then put Return&"This field is not visible" after last
char of SearchResult
end if
if Word2 <> "id" then
if the vis of group foundgroup of cd i of the topstack is
"false"
# this should not work (?), because "group" is also in the
contents of foundgroup,
# but somehow it does
then put Return& "This field is not visible" after last
char of Searchresult
end if
end if"
The script could have been much shorter if there wasn't the apparent
limitation for "of"-nestings (when using the script in a modeless search
stack), but
"if word 1 of the owner of fld j of cd i of the topstack is "group" and
the vis of the owner of fld j of cd i of the topstack is "false" then
...."
produces error messages as described in my last posting; interestingly
"word 1 of the owner....." does not produce an error, but "the vis of
the owner....." or the "the ID of the owner....." do.
The - of course simple - solution, once you have found out what could
have caused the problem, was to park the found group in a variable
"foundgroup" and only then to check the visibility.
Unfortunately
"if the vis of group foundgroup of cd i of the topstack is "false""
produces another error in case the group has only an ID and no specific
name. So you have to run an additional check for this as in the script
above.-
To have a property like "effective vis" that checks the *real*
visibility of a field would be convenient, but surely the need for such
a feature is not very urgent.-
Thank you for your patience if you chose to read this message.
Regards,
Wilhelm Sanke
Archives: http://www.mail-archive.com/[email protected]/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.