[Gambas-user] Comments in forms
Dag Jarle Nerland Johansen - Gambas
gambas at cd-bahia.com
Wed Feb 24 05:25:05 CET 2021
Hi again,
looked closer into it.
Comments in the form file ARE removed on load and save, also when
formatting on load and save is set to off.
(A disadvantage in my case).
I will help myself with setting an invisible unique object before and
after the parts that has to be re freshened.
Thanks anyway.
Dag
Am 24.02.21 um 03:41 schrieb Dag Jarle Nerland Johansen - Gambas:
> Hi,
> can it happen that comments are automaticity removed from the .form file?
> Comments start with #comment, and these lines are removed,
>
> I made program generating form files, but to refresh them without
> destroying changes I made later in the IDE, those parts which must be
> re-generated. For that I wrote 'REF START and 'REF END in the original
> generated form. Funny enough does it work not only one time but 2. The
> third time the comments are gone. I have absolutely no explanation for
> that behaviour. It looks like this:
>
> fsin=originala copy of the form.file renamed previously renamed
> fs=the form fie
> sc=a tag for different tabs on the form
> LB_FLD[i]=List of felds from a MySQL.table
> Do While Not fsin.Eof
> Line Input #fsin, sl
> s = "#REF START " & sc
> If InStr(sl, s) > 0 Then
> Do While s <> "#REF END " & sc ' Overread existing field
> definitions on the data panel
> Line Input #fsin, s
> i = i + 1
> Loop
> Print #fs, "#REF START " & sc
> dy = 3
> For i = 0 To LB_FLD.Count - 1
> MakeField(fs, sc, LB_FLD[i].Text, i)
> Next
> Print #fs, "#REF END " & sc
> Endif
> If Trim(sl) = "#REF START " & sc Then sl = ""
> Print #fs, sl
> Loop
> Please no comments on my way to program - I am old fashioned and stay
> so, learned programming in the 80-is, and it worked so...
> Thankful for any ideas
> Dag
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
More information about the User
mailing list