How to know if a 4D Write Pro document is 'dirty'

I want to know if a 4D Write Pro document has been modified. In 4D Write Classic the command is WR GET AREA PROPERTY(WriteArea;wr modified;$isModified) which does just that. Is there a similar 4D Write Pro attribute which can tell me this?

I’ve dug around in the documentation but haven’t found anything yet. I know I can get the modification date time from the document using OB Get(WriteObject;"dateModified”), but that’s doesn’t tell me whether the document is ‘dirty’ (has any unsaved changes). I guess I could store that value when the document is opened, then compare it later. I’m hoping there is something built in.

Tom Benedict

In current WP, you have to take care by yourself.

Look at this demo, there is an on data change method which sets the object properties of the WP area to modified.


Thanks for the response Armin.

The code in the example db works great!