cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

dobj_is_mod(dobj ) inspects dobj modified state; what can one use to set the dobj modified state?

bbeetcher
1-Visitor

dobj_is_mod(dobj ) inspects dobj modified state; what can one use to set the dobj modified state?

I can't seem to figure out if one can or how to set a dobj's modified state. Namely,  I want to set it to unmodified.

1 REPLY 1

Just sharing the answer to my question in case it's useful to someone else. As part of this, it might be useful to note that my dobj reference in this question was to the editor object one uses to inspect the state of an included file.

In short, the answer is: You can't.

Details: PTC Arbortext support has answered this question with the following: Currently, there is no programmatic way to simply mark a given xinclude as "not modified". If a direct programmatic technique was desired to individually clear out the modified state of an xinclude, that would be require an enhancement request.


In case you're interested, here's why I asked the question?

  • Part of our customization of the editor is to, on expansion of an include file, temporarily set attributes within the expanded source for read only included files that results in color highlighting of the files. This highlighting is only done for files that will not be modified by the authors using our tooling. So when the author saves the file we do not want these highlighted files to be saved.
  • In doing this,  a problem arises where, when the main file has been modified, setting of these highlighting attributes causes the included file's dobj to be marked as modified by the internal editor processing. When we're done with our open processing on these included files, we want to use some editor interface/function that will set the file state as unmodified such that a subsequent dobj_is_mod function call will return 0.
  • The only work around we've found to address the problem is to first ensure the main file is saved before performing our include highlighting. For some reason, when the main file isn't modified setting of these highlighting attributes doesn't result in the include's dobj being marked as modified.
Announcements

Top Tags