1. If the .pbf file contains a button with caption "=" (e.g. in a program for a calculator where this button shall be used to display the result), the code is incorrect, see below.
2. If the .pbf file contains an editor gadget with text including commas, the text is not shown completely.
I have summarized the two errors in a short file Test.pbf. The file has been created correctly using the Form Designer. Code:
Code: Select all
; Form Designer for Purebasic - 5.0
; Warning: this file uses a strict syntax, if you edit it, make sure to respect the Form Designer limitation or it won't be opened again.
Enumeration #PB_Compiler_EnumerationValue
#Window_0
EndEnumeration
Enumeration #PB_Compiler_EnumerationValue
#Button_0
#Editor_0
EndEnumeration
Procedure InitWindow_0()
OpenWindow(#Window_0, 0, 0, 600, 400, "Test.pbf", #PB_Window_SystemMenu)
ButtonGadget(#Button_0, 40, 30, 40, 20, "=")
EditorGadget(#Editor_0, 30, 90, 480, 130)
AddGadgetItem(#Editor_0, -1, "This text line will be shown correctly if Test.pbf is opend by the Form Designer again - ")
AddGadgetItem(#Editor_0, -1, "this text line, however, not because it contains comma.")
EndProcedure
When this file is opened again by the Form Designer, the Form Designer creates the following code view:
Code: Select all
Global ButtonGadget(#Button_0, 40, 30, 40, 20, "
Enumeration #PB_Compiler_EnumerationValue
#Window_0
EndEnumeration
Enumeration #PB_Compiler_EnumerationValue
#Editor_0
EndEnumeration
Procedure InitWindow_0()
OpenWindow(#Window_0, 0, 0, 600, 400, "Test.pbf", #PB_Window_SystemMenu)
ButtonGadget(#Button_0, 40, 30, 40, 20, " = ButtonGadget(#PB_Any, 40, 30, 40, 20, "=")
EditorGadget(#Editor_0, 30, 90, 480, 130)
AddGadgetItem(#Editor_0, -1, "This text line will be shown correctly if Test.pbf is opend by the Form Designer again - ")
AddGadgetItem(#Editor_0, -1, "this text lin")
EndProcedure

