Revert To missing a show variables?


#1

My code unexpectedly reduced a database from 40k+ records to 4 records. Revert To > Browse All Versions brought them back easily. I recall when that didn’t work reliably for me, so thanks for some bug squishing along the way! However after reverting, in spite of a window full of records, it still showed “4 visible / 4 total” until I intentionally made a new selection. I suspect a cosmetic Showvariables statement may be missing in your Revert To routine. Next, to debug MY code…


#2

You might want to add a line of code before your test code while you are in test mode.

startdatabasechange "ALLRECORDS","Testing"

This could allow you to undo the results of some bad code simply by then selecting Undo Testing from the Edit menu.


#3

Good advice, but I already knew that. Fortunately this data originates outside Panorama and is easily re-imported if all else fails. The annoyance is I’d thought I’d finished debugging this routine when I last ran it a couple months ago. If whatever happened will repeat it shouldn’t take long to find and fix.


#4

The statement you are thinking of would actually be showrecordcounter. However, the Revert To routine is actually written in Objective-C, not Panorama code, but your idea is on the right track. I’ve added this to the issue tracker.