mark_h
30th September 2004, 19:40
I have a couple of sessions with buttons that I put on them using choice.user options. What a user reported yesterday was that when they double clicked the button it started the sub-session and then executed the end.program section. This varied from sub-session to sub-session and what double clicking the buttons did. Is there a way to clear this keyboard input in the sub-session? I have found that if I use execute(modify.set) for a couple of the sessions that it takes care of the problem, but it only works in 2 out of the 3 sub-sessions.

Thanks

Mark

klixy23
5th October 2004, 17:14
Is setting of ignore.first.event in subsession help? Or suspend the subsession some time in before.program section. Or suspend the main session some time before zoom or switch to subsession. Only some ideas to be try.

mark_h
6th October 2004, 15:44
The ignore.first.event did not work. According to the documentation it only suspends the startup event. I have not tried suspend - I will try it when I get a chance.

Mark

mark_h
18th October 2004, 16:03
Just thought I would let everyone know I fixed it with the events. Just added this in the before program of each of the sub-sessions. It appears that in my main program when you click a button several events get fired off - EVTARMBUTTON, EVTDISARMBUTTON, etc. So by adding this in the before.program(or form) section I can clear the events. Have not found a problem yet.

Mark


| 20041018.start
long event_3(EVTMAXSIZE) | 20041018.end

| 20041018.start
while pending.events()>0
next.event(event_3)
endwhile
| 20041018.end

jan van dillen
18th October 2004, 17:47
I think you can solve this by defining a default button in the session Maintain Form buttons.

mark_h
18th October 2004, 18:12
First when I set the default button the double click would execute whatever the default button was. I turned off default buttons early on for another reason. These sessions are for barcode use - for some reason when our barcode readers are configured when you scan a barcode that contains a $I(tab) the session executes the default button. So if I asked for receipt number, qty approved and they scanned receipt number the session would automatically start the processing since the default button was continue. Also by turning off the default buttons I can scan an escape and tab to start processing the input. It appears that the escape points to the first button on the form - which I conviently make the process button. Have not had time to determine why when scanning a $I the sessions would start processing when a default button is set. I tried several things on the scanners and the session, but it looked like it was the session and not the scanner.

Mark