Posted by Otto Metschar (203.61.241.239) on December 09, 2004 at 04:50:54:
In my program I write the text to the fields with the COS.SetDlgItemText function then execute the COS.ModalLoop function to randomly enter data to the fields. During this process the follwoing code is executed which then causes the program to automatically and endlessly loop through all the control Id's within the USR.CommandHandler sub-routine.
cosCtlId = NUM(IWCNTLID$,ERR)
GOSUB COS.GetDlgItem !Retrieve Handle(Null=Unsuccessful)
cosCWnd$ = SUB(cosCWnd$,1,1)
IF cosCWnd$ NE "@00@" THEN !Retrieve Successful?
cosItemSize = NUM(IDATALEN$,ERR)
GOSUB COS.EditLimitText
cosCtlText$ = ICONTENT$
!* GOSUB COS.SetDlgItemText !Causes endless Loop
GOSUB COS.SetWindowText
ENDIF
It appears that the COS.SetDlgItemText function causes this. When I use the COS.SetWindowText function as shown in the above code, this doesn't happen. When I execute the COS.ExitModalLoop function before the COS.SetDlgItemText function the endless loop doesn't happen either.
To me it appears the the COS.SetDlgItemText function triggers something within the ModalLoop function to cause this to happen.
Thanks
Otto