FD5b3 crashes when loading old VD4 files (FD5b2 does not)
Posted: Thu Dec 13, 2012 11:01 am
When trying to load old "visual Designer 4" generated files, "Form Designer 5 beta 2" does it nice (!), but "Form Designer 5 beta 3" crashes.
VD4 sample file who causes the crash :
VD4 sample file who causes the crash :
Code: Select all
Enumeration
#Frm_Main
#Frm_Properties
#Frm_About
EndEnumeration
Enumeration
#Chk_NoBorder
#Txt_YPosition
#Txt_XPosition
#Chk_ForcePosition
#Lbl_YPosition
#Lbl_XPosition
#Chk_TopMost
#Opt_Windowed
#Opt_Screen
#Lbl_Screen
#Cmd_PropertiesValide
#Chk_Centered
#Cbo_VideoOutput
#Fra_OutputSize
#Chk_KeepAspectRatio
#Fra_VideoOutput
#Txt_OutputHeight
#Lbl_OutputHeight
#Lbl_OutputWidth
#Txt_OutputWidth
#Opt_Size_0
#Opt_Size_1
#Opt_Size_2
#Fra_Misc
#Cmd_CloseAbout
#Img_About
#Lbl_About
EndEnumeration
;- Images
Global Image0 = CatchImage(#PB_Any, ?Image0)
DataSection
Image0:
IncludeBinary "GFX/about.png"
EndDataSection
;- Fonts
CompilerIf #PB_Compiler_OS = #PB_OS_MacOS
Global FontID1 = LoadFont(1, "Arial Unicode MS", 21)
CompilerElse
Global FontID1 = LoadFont(1, "Arial", 18)
CompilerEndIf
Procedure Open_Frm_Properties()
If OpenWindow(#Frm_Properties, 220, 36, 520, 289, "Frm_Properties", #PB_Window_SystemMenu | #PB_Window_Invisible | #PB_Window_TitleBar , WindowID(#Frm_Main))
;If CreateGadgetList(WindowID(#Frm_Properties))
Frame3DGadget(#Fra_OutputSize, 240, 10, 270, 150, "Fra_OutputSize")
OptionGadget(#Opt_Size_0, 250, 30, 160, 20, "Opt_OriginalSize")
OptionGadget(#Opt_Size_1, 250, 50, 160, 20, "Opt_FullSize")
OptionGadget(#Opt_Size_2, 250, 70, 160, 20, "Opt_FixedSize")
TextGadget(#Lbl_OutputWidth, 270, 100, 170, 20, "Lbl_OutputWidth", #PB_Text_Right)
StringGadget(#Txt_OutputWidth, 450, 100, 50, 20, "")
TextGadget(#Lbl_OutputHeight, 270, 120, 170, 20, "Lbl_OutputHeight", #PB_Text_Right)
StringGadget(#Txt_OutputHeight, 450, 120, 50, 20, "")
Frame3DGadget(#Fra_Misc, 240, 170, 270, 70, "Fra_Misc")
CheckBoxGadget(#Chk_KeepAspectRatio, 250, 190, 250, 20, "Chk_KeepAspectRatio")
CheckBoxGadget(#Chk_Centered, 250, 210, 250, 20, "Chk_Centered")
Frame3DGadget(#Fra_VideoOutput, 10, 10, 220, 230, "Fra_VideoOutput")
OptionGadget(#Opt_Windowed, 20, 30, 200, 20, "Opt_Windowed")
OptionGadget(#Opt_Screen, 20, 170, 200, 20, "Opt_Screen")
CheckBoxGadget(#Chk_NoBorder, 60, 50, 160, 20, "Chk_NoBorder")
CheckBoxGadget(#Chk_TopMost, 60, 70, 160, 20, "Chk_TopMost")
CheckBoxGadget(#Chk_ForcePosition, 60, 90, 160, 20, "Chk_ForcePosition")
TextGadget(#Lbl_XPosition, 60, 120, 100, 20, "Lbl_XPosition", #PB_Text_Right)
StringGadget(#Txt_XPosition, 170, 120, 50, 20, "")
TextGadget(#Lbl_YPosition, 60, 140, 100, 20, "Lbl_YPosition", #PB_Text_Right)
StringGadget(#Txt_YPosition, 170, 140, 50, 20, "")
TextGadget(#Lbl_Screen, 60, 190, 160, 20, "Lbl_Screen")
ComboBoxGadget(#Cbo_VideoOutput, 60, 210, 160, 20)
ButtonGadget(#Cmd_PropertiesValide, 210, 260, 110, 20, "Cmd_Valide")
;EndIf
EndIf
EndProcedure
Procedure Open_Frm_About()
If OpenWindow(#Frm_About, 234, 376, 485, 114, "Frm_About", #PB_Window_SystemMenu | #PB_Window_Invisible | #PB_Window_TitleBar | #PB_Window_WindowCentered , WindowID(#Frm_Main))
;If CreateGadgetList(WindowID(#Frm_About))
ImageGadget(#Img_About, 10, 10, 64, 64, ImageID(Image0))
TextGadget(#Lbl_About, 90, 20, 380, 40, "App v0.0.0", #PB_Text_Center)
SetGadgetFont(#Lbl_About, FontID1)
ButtonGadget(#Cmd_CloseAbout, 190, 80, 110, 20, "Cmd_Close")
;EndIf
EndIf
EndProcedure