Subject Re: TextLabel
From Mervyn Bick <invalid@invalid.invalid>
Date Sat, 15 Jan 2022 15:58:47 +0200
Newsgroups dbase.getting-started

On 2022/01/14 20:56, Steven Ellis wrote:
> I believe this is a bug.
> For N = 1 to 10
>         mvSummaryNMinVis = "form.Summary"+N+"min.visible"
>         mvSummaryNMaxVis = "form.Summary"+N+"max.visible"
>         mvSummaryNAvgVis = "form.Summary"+N+"Avg.visible"
>         mvSummaryNWAvgVis = "form.Summary"+N+"WAvg.visible"
>         &mvSummaryNMinVis. = false
>         &mvSummaryNMaxVis. = false
>         &mvSummaryNAvgVis. = false
>         &mvSummaryNWAvgVis. = false
>         ? &mvSummaryNMinVis.
>         ? &mvSummaryNMaxVis.
>         ? &mvSummaryNAvgVis.
>         ? &mvSummaryNWAvgVis.
> //Calculations are done then I want to make the text label visible
> These return all false and hides the textlables
>         &mvSummaryNMinVis. = true
>         &mvSummaryNMaxVis. = true
>         &mvSummaryNAvgVis. = true
>         &mvSummaryNWAvgVIs. = true
>         ? &mvSummaryNMinVis.
>         ? &mvSummaryNMaxVis.
>         ? &mvSummaryNAvgVis.
>         ? &mvSummaryNWAvgVis.
> next n
> These return all true but the textlabel is still hidden.  I also tried setting the text of the
> textlabel to "" and it has no effect.

I replied to this in the bug_reports newsgroups together with a working
example but I didn't explain why your code didn't work as expected.

In fact, I CAN'T explain it as I haven't been able to replicate the
problem. :-(

It helps, especially in the bug-reports newsgroup, if you can post a
little working (or non-working :-) ) turnkey program that demonstrates
the problem.

There is nothing wrong with the way the macros work in the first
section.  The textlabels are made invisible as required.  The print
statements correctly reflect that the visible property has been set false.

If the memvars in the second section are in scope (which is supported by
the fact that the print statements return true) then it works for me and
the textlabels are made visible.  If the memvars are not in scope then
executing the first macro throws an error "Unrecognized command verb:
&mvSummaryNMinVis. = true"

Something seems to be missing.

The contents of the text property of a textlabel object has no affect
whatsoever on its ability to be made invisible or visible.