I have 8 fields where the rawvalue must be ge another field; if not, then setfocus back to that field. This works except when I tab to the next field without putting in the correct figure then it goes into a looping cycle and I have to break the program in order to get out...
if (numShower.rawValue < showercapa.rawValue) { xfa.host.messageBox("Invalid Number Input","Warning","1");
xfa.host.setFocus(this);
}
I have tried several solutions but nothing is working!
What causes this behavior. Please help!
The best way to design somthing like this is to draw out the sequence as a state machine diagram. Then test your assumptions about how it is going to work by placing "console.println()" statments in all of the events being used.
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script