[Gambas-user] Behaviour of Control.Public=True

Dag Jarle Nerland Johansen - Gambas gambas at cd-bahia.com
Thu Sep 16 13:33:24 CEST 2021


Am 14.09.21 um 13:54 schrieb Dag Jarle Nerland Johansen - Gambas:
> Hi,
> I generate forms, and set some controls public true, because I need 
> the value in other forms. Some fields (Textbox) do as they should. I 
> write it out like this, same for all fields:
> The data used come as parameter.
>
> /      Print #fs, "{   " & GSCT & "_" & dat!feld & " TextBox"//
> //      h = dat!objh / 7//
> //      Print #fs, "MoveScaled(11, " & Gpy & ", " & w & ", " & 
> ma.FLD_H & ")"//
> //      Print #fs, "Tag=" & ch3 & dat!objtyp & ch3//
> //      Print #fs, "Enabled=" & ch3 & dat!enable & ch3//
> //      Print #FS, "#Public = True"//
> //
> //      Print #fs, "}"/
>
> and output is like this:
>
> /{   GFLD_tbl TextBox//
> //MoveScaled(11, 11.3, 21.4285714285714, 3)//
> //Tag="TB"//
> //Enabled="-1"//
> //#Public = True//
> //}/
>
> it works fine until I call
>
> /  If FMain.GTBL_tbl.Text = "" Then/
>
> *Unknown symbol in FMain.*
> I make the field public=false in FMain (IDE), then back to true, then 
> it works. another field I use later makes no problem, although written 
> the same way. (With  the same sub)
> Does anyone have an idea why this only happens with one 
> field/control/textbox?
> Thanks in advance
> Dag JNJ
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
Hi again,
I installed the latest release and hoped the issue was gone, but no, 
still there.
I got no answers and think I explained it poorly.

I write out .form files, in this case FMain.form
I need access to some fields from this form, so I made all textboxes public.
The problem that occurs it only with one textbox, named GTBL_tbl.
GTBL_tbl.Public=True, I also see that in the IDE.
But when I ask if the textbox is empty from another form I get the 
error: Unknown symbol
I change manually from True to False and back to True - it works.
Following fields that I refer to responds without error, that is what 
confuses me.
I will search an another solution, though the behaviour is not normal.
Regards, Dag JNJ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210916/9d71e297/attachment.htm>


More information about the User mailing list