I am not an advanced programmer, so every now and then I get a simple problem that still seems to be too simple for me. And so... help.
I have written the following code:
Code: Select all
;- hoofdlus
Repeat
Event = WaitWindowEvent(20)
Select Event
Case #PB_Event_Gadget
Select EventGadget()
Case 11 ; document geselecteerd
Gosub SelectieGadget11
Case 12 ; reset gadget 11 - documenten
Gosub ResetGadget11
Case 21 ; contact geselecteerd
Gosub SelectieGadget21
Case 22 ; reset gadget 21 - contacten
Gosub ResetGadget21
Case 23 ; zoeken contacten
Gosub ZoekenContacten
Case 31 ; dossier geselecteerd
Gosub SelectieGadget31
Case 32 ; reset gadget 31 - dossiers
Gosub ResetGadget31
Case 33 ; zoeken dossiers
Gosub ZoekenDossiers
Case 41 ; omschrijving geselecteerd
Gosub SelectieGadget41
Case 42 ; reset gadget 41 - omschrijvingen
Gosub ResetGadget41
Case 43 ; zoeken omschrijving
Gosub ZoekenOmschrijving
Case 61 ; selectie bestanden in tmp
Gosub SelectieGadget61
EndSelect
EndSelect
ForEver
I did notice it when in one of the subroutines something needed to be added. And there it was: the thing that had to be added, was added twice.
It looks as if the subroutine is executed twice... And no, nothing in the subroutine causes that.
So it looks as if this loop above executes the subroutine twice.
Is it a known problem? Don't think so, I must be doing something wrong, but what? Thanks in advance for your help and suggestions. I'm pretty shure it will be something simple I have overlooked.
Cheers, Cor
// Code Tags added (Kiffi)