Author | Topic: Re: User able to bypass VALID by pressing Escape (PDR ID 6217 ":original wrong when execution VALID clause") | |
---|---|---|
Andreas Gehrs-Pahl View the complete thread for this message in: | Re: User able to bypass VALID by pressing Escape (PDR ID 6217 ":original wrong when execution VALID clause") on Fri, 28 Aug 2015 15:31:16 -0400 Patrick, >Thanks for the quick response. Doesn't that PDR seem applicable because >the :undo method doesn't have the original value to restore when it's >triggered in GetApplyKey (assuming Escape was pressed)? Am I missing >something? I haven't used @ Say/Get for a very long time, so I'm not sure what the best way would be to fix your problem, but it seems to me that Clipper 5.2e and Xbase++ 2.00.625 behave the same way (out of the box), with the exception of the oGet:Original iVar, which (in Xbase++) is updated to the oGet:Buffer value whenever the oGet object loses focus, while in Clipper it is updated to the oGet:Buffer value only when the oGet object receives focus. In Clipper as well as Xbase++, the value of an oGet object is reset to its original/previous value (that it had before the object received focus), when the ESC key is pressed (to cancel the Read operation). Also, neither with Clipper nor with Xbase++, will any of the other oGet objects -- that don't have input focus at the time when the ESC key is pressed -- changed back (or reset) to a previous (or "original") value. So, if you want to reset all Get objects to their original values if the Read operation is canceled (with ESC or any other way), you would have to have custom code in place that resets all oGet objects (or at least all their associated variables) to their original values, no matter if you use Clipper or Xbase++, and you should be able to continue to use that same Clipper code in Xbase++. Of course, a working example program that can be compiled in Clipper and Xbase++, and which shows the (different or wrong) behavior, would be the best way for getting more specific help in this forum. >I may try your instructions for modifying GetSys just as an exercise, >but it would be nice if we didn't actually have to deploy anything like >that. If your change to GetSys fixes your problem, maybe you would like to post it here, so that others can utilize it, and maybe it will help Alaska to create a permanent fix, if one is required. Hope that helps, Andreas Andreas Gehrs-Pahl Absolute Software, LLC phone: (989) 723-9927 email: Andreas.GP@Charter.net web: http://www.Aerospace-History.net |