Constant visibility.
Posted: Thu Mar 21, 2024 3:26 am
Good morning,
I have a question about a problem with the visibility of variables and in my case, of a constant.
I have two windows that I write to two separate files. In file1.sb there is:
And in file2.sb there is:
The compiler gives me an error: Constant not found #Window_1, in file2. I don't understand why the constant #Window_1 is not visible in file2 even though I have done an Include of this file in file1. Can anyone enlighten me? Thanks in advance.
I have a question about a problem with the visibility of variables and in my case, of a constant.
I have two windows that I write to two separate files. In file1.sb there is:
Code: Select all
IncludeFile "file2.sb"
Enumeration FormWindow
#Window_1
EndEnumeration
OpenWindow(#Window_1, 0, 0, ww, hh, "Window1", #PB_Window_ScreenCentered | #PB_Window_TitleBar)
etc...
Code: Select all
Enumeration FormWindow
#Window_2
EndEnumeration
OpenWindow(#Window_2, 0, 0, 300, 560, "Window2", #PB_Window_ScreenCentered)
if (condition)
SetActiveWindow(#Window_1); This is where I got the error: "Constant not found #Window_1"
EndIf