Tip: Change Procedures without Touching Modified Date e.g. Change Call Tree

I use the Last Modified Date view of Procedures in an APP often to see what has recently changed.

I had a Procedure that the APP Call Tree was wrong. It had Procedures listed on the Calls Tab that were no longer called or changed. I know this change happened last year. I wanted to change the Calls Tab but not touch the Procedure Modified Date and have it sort to the top.

On the Procedure Properties window the Green Circle button save changes but does touch the Last Modified Date, so you cannot press that.

My Tip is to press the Blue Diskette button to save your changes as that button does NOT change the Last Modified Date. Then press the Red X Circle button to close the Procedure. AFAIK this loses nothing.

One issue you’ll run into is the IDE sees the Red X as Cancel so it will not refresh the Call Tree to show any changes. You have to change views, like a few times.

image

Another thing I may change is the Procedure Description that shows in all the APP views. It’s more documentation so I don’t want to touch the Modified Date.

5 Likes

Could be useful, thanks Carl.
Do you know if pressing the blue diskette also updates the .App file?

That is exactly what it does, writes the changes to the APP.

The Cancel button will not undo those saved changes.

Sometimes when I have the Window in a good state I’ll press the Blue disk to save it. Then I’ll go do more Window changes that if I mess up I can Cancel the Procedure.

Sure I can cancel in the Window Designer but sometimes I can be switching between that and the Window… Code Editor so have made a few changes in each.

1 Like

Pressing a button with the diskette icon forces saving data to APP only on the App Tree level. For modules, procedures, etc. the AppGen does following actions on pressing this button:

  • updates information in the in-memory database
  • writes changed data to a recovery file.

If size of a recovery file exceeds the limit set in the Application Options, the AppGen writes entire APP from the in-memory database to the disk.

1 Like

Does pressing the Green Circle Check button do same things as the Diskette icon?

What’s different is it exits the Procedure, changes the Modified Date and Refreshes the APP view to show any changes?

I can’t be sure in my answers because I not managed the AppGen after writing it. Moreover, I guess, my AppGen sources are not up to date,

The AppGen applies the save action for all dialog tabs with changed information in both cases.

All AppGen dialogs are building on the base of actual information in the in-memory database (+ the AppGen generates the application in special modes to get required information for some dialogs, e.g. to build the embeds tree). If there is a difference after exit from some dialog with saving changes in either way, this is a bug.

Pressing a button with the diskette icon forces saving data to APP only on the App Tree level.

This just got me today - worked on a procedure for hours, pressed the diskette (I always do this) and then pressed the green marker to accept the changes - my whole Clarion editor went into a spinner loop and gave me a nice window telling me an exception had occured, only thing I could do was close Clarion - after opening the project again it give me a choice “Last Save” or “Recover” - as I thought the diskette saved the changes I pressed “Last Save” - sadly it didn’t save the changes yet so everything I worked on for hours was gone… - luckily I was able to extract some code from the clw files it generated before - but still - it’s so confusing seeing a SAVE button and it not actually saving the changes… - in that regard, working on C# or other language projects with a plain text file based coding structure is way more fault tollerant than Clarion with it’s Binary App file…

1 Like

In that situation I’ll save all of that App’s files before I reopen. Be sure and save the .AP~ file, that contains your work since last save.

That way I can undo my choice by copying back the files and try the alternate.

I also use those saved files to compare CLWs after generating.

I never click on “Last Save” I alway go for “Recover” and it seems to do a great job.

2 Likes