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

Dag Jarle Nerland Johansen - Gambas gambas at cd-bahia.com
Fri Sep 17 11:42:53 CEST 2021



Am 17.09.21 um 10:46 schrieb Bruce Steers:
> When i study my form files i see if i have set Public = true then i 
> get the following...
>
> It adds #Public = True to the fields.
> It also adds an exclamation mark "!" to the beginning of the definition..
>
> *      { !Button1 Button
>         MoveScaled(5,14,14,4)
>         #Public = True
>         Text = ("WhatRadio?")
>       }*
>
>
> Did you try adding ! to the definition start?
> /Print #fs, "{ !" & GSCT & "_" & dat!feld & " TextBox"//
> /
> BruceS
>
>
>
> On Thu, 16 Sept 2021 at 12:34, Dag Jarle Nerland Johansen - Gambas 
> <gambas at cd-bahia.com <mailto:gambas at cd-bahia.com>> wrote:
>
>     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  <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
>
>     ----[ http://gambaswiki.org/wiki/doc/netiquette
>     <http://gambaswiki.org/wiki/doc/netiquette> ]----
>
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
Thank you very  much! That little thing was it. You have good eyes, or I 
have bad.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210917/20125c55/attachment.htm>


More information about the User mailing list