Prevent the FD from using the zero value
Posted: Thu Feb 07, 2019 4:36 pm
I have been using the FD for years and sometimes I have problems with fonts (a font does not change) or images that are shifted (it is not the right image that is loaded in the first image)
I may review the code line by line, but I never found out why. I think there is a place where the system misuses the value zero
Failing to find out where, I found a trick for: Prevent the FD from using the value zero for each of the enumeration types by using this value for another constant (even if not used)
As the FD code cannot be modified, I create enumerations called before the IncludeFile of formsAnd it works.
I may review the code line by line, but I never found out why. I think there is a place where the system misuses the value zero
Failing to find out where, I found a trick for: Prevent the FD from using the value zero for each of the enumeration types by using this value for another constant (even if not used)
As the FD code cannot be modified, I create enumerations called before the IncludeFile of forms
Code: Select all
; Main Code
EnableExplicit
Enumeration FormWindow
#Void
EndEnumeration
Enumeration FormGadget
#Void
EndEnumeration
Enumeration FormMenu
#Void
EndEnumeration
Enumeration FormImage
#Void
EndEnumeration
Enumeration FormFont
#Void
EndEnumeration
; And then call forms
XIncludeFile "..... .pbf"
XIncludeFile "..... .pbf"
XIncludeFile "..... .pbf"