[Gambas-user] Module is not static
BB
adamnt42 at gmail.com
Tue Nov 29 08:04:15 CET 2022
I'm reviving an old project, not used since Feb 2020, that re/generates
the Gambas source code for some other project. (Essentially, like the
Advanced/Format Code in the IDE but with a lot more, anyway...).
But suddenly I have a module "Template" (that contains a set of public
constants and that's all) that when I refer to it in my code generator I
get errors like "_ERR: 'Template.ConstDec' is not static_".
The top of the Template module looks like :
' Gambas module file
''' This module contains the code templates for all the code generated by the program.
'=================================================================
'==== Constants ====
'=================================================================
Public Const EventDec As String = "Event #NAME(#SIGNATURE) " '
Public Const PropertyDec As String = "#STATIC Property #READONLY #NAME #ALIASES As #DATATYPE " '
Public Const GlobalDec As String = "#STATIC #SCOPE #NAME As #AUTOCREATE #DATATYPE #DEFAULTVALUE " '
Public Const ArrayDec As String = "#SCOPE #NAME As #AUTOCREATE #DATATYPE [ #DIMENSIONS ] " '
*Public Const ConstDec As String = "#SCOPE Const #NAME As #DATATYPE =
#VALUE " ' *
Public Const StructDec As String = "Public Struct #NAME \n #STRUCTITEMS\n End Struct" '
and a sample failing line is
sCode = Replace(*Template.ConstDec*, "#SCOPE", IIf(Me.IsPrivate, "Private", "Public"))
This worked fine two years ago. Any idea what I could be doing wrong?
tia
bruce
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20221129/11cb3c0e/attachment.htm>
More information about the User
mailing list