oh dag. :-( I give up. can someone just fix the code?
now nothing works:
;program by Paul Herz
Global filename
filename="project2"
Global filewin
Window1=CreateWindow("Program",500,300,400,300)
SetMinWindowSize Window1,400,300
SetStatusText Window1,"©2008 ÆroBlu Software"
menu=WindowMenu(Window1)
file=CreateMenu("File",0,menu)
CreateMenu("New",1,file)
CreateMenu("Open",2,file)
CreateMenu("",0,file)
CreateMenu("Save",3,file)
CreateMenu("Save as...",4,file)
CreateMenu("",0,file)
CreateMenu("Quit",5,file)
Function newfilewindow()
filewin=CreateWindow("TEST",525,335,350,240,0,17)
End Function
UpdateWindowMenu Window1
;--->>MAIN<>LOOP<<---;
Repeat
id=WaitEvent()
event = WaitEvent()
Select event
Case $803
window_closed = EventSource()
Select window_closed
Case Window1
Case file
End Select
End Select
If ID=$803 Then
Print EventData
EndIf
If ID=$1001 Then
EID=EventData()
Select EID
Case 1
newfilewindow()
Case 2
AppTitle("Open")
Notify("Open")
Case 3
AppTitle("Save")
Notify("Save")
Case 4
AppTitle("Save as...")
Notify("Save as...")
Case 5
AppTitle("Are You Sure?")
result=Confirm("Are You Sure You Want to Quit?",True)
If result=1 Then
End
Else
EndIf
End Select
EndIf
Forever
End
;-----------------------
now nothing works:
;program by Paul Herz
Global filename
filename="project2"
Global filewin
Window1=CreateWindow("Program",500,300,400,300)
SetMinWindowSize Window1,400,300
SetStatusText Window1,"©2008 ÆroBlu Software"
menu=WindowMenu(Window1)
file=CreateMenu("File",0,menu)
CreateMenu("New",1,file)
CreateMenu("Open",2,file)
CreateMenu("",0,file)
CreateMenu("Save",3,file)
CreateMenu("Save as...",4,file)
CreateMenu("",0,file)
CreateMenu("Quit",5,file)
Function newfilewindow()
filewin=CreateWindow("TEST",525,335,350,240,0,17)
End Function
UpdateWindowMenu Window1
;--->>MAIN<>LOOP<<---;
Repeat
id=WaitEvent()
event = WaitEvent()
Select event
Case $803
window_closed = EventSource()
Select window_closed
Case Window1
Case file
End Select
End Select
If ID=$803 Then
Print EventData
EndIf
If ID=$1001 Then
EID=EventData()
Select EID
Case 1
newfilewindow()
Case 2
AppTitle("Open")
Notify("Open")
Case 3
AppTitle("Save")
Notify("Save")
Case 4
AppTitle("Save as...")
Notify("Save as...")
Case 5
AppTitle("Are You Sure?")
result=Confirm("Are You Sure You Want to Quit?",True)
If result=1 Then
End
Else
EndIf
End Select
EndIf
Forever
End
;-----------------------