Unanswered: After inserting a Record in PdoxWin not longer current
It looks as if with the introduction of Paradox for Windows all the handy things in Pdox4.5 have been lost. A query, form or report is not default done on the current table, the simple one keyed macro (F3 - ALT-F3) no longer exists, scripting has become a language and no longer the recording of key strokes and many other things.
Now, on a keyed table I like to insert a record.
F9 | insert | fill data | F9 (end edit)
The view of the record is lost! This was not so in Pdox45, you stayed on the record you had just inserted. This is rather annoying.
Can this be changed in the setup or do I have to write code to perform such a normal user friendly behavior of Paradox?
The following example shows code attached to the action event method of a table frame (it would also work for a multirecord object). It tests for a DataUnlockRecord and forces a DataPostRecord, invoking the built-in code that makes the record fly away. The table frame follows the record as it flies away:
method action(var eventInfo ActionEvent)
if eventInfo.id() = DataUnlockRecord then
In ObjectPAL, FlyAway can cause confusion about where a TCursor is pointing after a record is posted. The general rule is that if the record moves, the TCursor unlocks the record and points to the next record.
When working with keyed tables, when you call postRecord, the TCursor follows the posted record if it flies away. When you call unlockRecord, the TCursor does not follow the record.