PureBasic - Dialog
Verfasst: 28.09.2013 22:15
Ich wollte mir mal die neue Funktion - Dialog mit XML anschauen und frage mich, warum das Beispiel nicht geht?
Fehler ist das angegebene #Xml ist nicht initialisiert?
Ist es doch aber mit #Xml = 0 oder nicht?
Code: Alles auswählen
;
; ------------------------------------------------------------
;
; PureBasic - Dialog example file
;
; (c) 2013 - Fantaisie Software
;
; ------------------------------------------------------------
;
#Xml = 0
#Dialog = 0
; This callback is directly set in the xml
;
Runtime Procedure EnableAlphaBlendingEvent()
Debug "Enable alpha blending checkbox modified !"
EndProcedure
If LoadXML(#Xml, "Data/ui.xml") And XMLStatus(#Xml) = #PB_XML_Success
CreateDialog(#Dialog)
If OpenXMLDialog(#Dialog, #Xml, "hello", 200, 200)
OneInstanceCheckbox = DialogGadget(#Dialog, "OneInstanceCheckbox")
SetGadgetText(OneInstanceCheckbox, "Instance text changed")
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
Else
Debug "Dialog creation error: " + DialogError(#Dialog)
EndIf
Else
Debug "XML error on line " + XMLErrorLine(#Xml) + ": " + XMLError(#Xml)
EndIf
Fehler ist das angegebene #Xml ist nicht initialisiert?
Ist es doch aber mit #Xml = 0 oder nicht?