PureBasic Forum
http://forums.purebasic.com/english/

Prevent the FD from using the zero value
http://forums.purebasic.com/english/viewtopic.php?f=12&t=72245
Page 1 of 1

Author:  Marc56us [ Thu Feb 07, 2019 4:36 pm ]
Post subject:  Prevent the FD from using the zero value

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 forms
Code:
; 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"
And it works.

:wink:

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/