if I run the code, I get a double event.
That is, what it has to do:
Click on the left gadget, fill with "x". Click on the right gadget for example, fill the gadget with "X" and dont change the other gadgets. Click on left gadget will clear it.
The first click works fine, but the second click suddely produces a 2. event, what is the same as the one from the click before. But I don't know, from where it comes.
Code: Select all
If OpenWindow(0, 50, 50, 200, 200, #PB_Window_SystemMenu, "") = 0
MessageRequester("Info"," Konnte das Fenster nicht oeffnen!"+#CRLF$+"Das Programm wird beendet.")
End
EndIf
CreateGadgetList(WindowID(0))
StringGadget(0, 30, 30, 20, 20, "")
StringGadget(1, 50, 30, 20, 20, "")
StringGadget(2, 70, 30, 20, 20, "")
Repeat
EventID = WaitWindowEvent()
If EventID = #PB_Event_Gadget
EVGID = EventGadgetID()
Debug "EVGID: "+Str(EVGID)
If GetGadgetText(EVGID) = ""
SetGadgetText(EVGID,"x")
Else
SetGadgetText(EVGID,"")
EndIf
EndIf
Until EventID = #PB_EventCloseWindow
End
Is this a bug on Mac or bad code?
I cannot stop it.
Or become I senile?
Hope, that there are a lot of Mac-User to help

michel51