• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Screen refresh triggers document change

Community Expert ,
Jul 04, 2016 Jul 04, 2016

Copy link to clipboard

Copied

Dear all,

In my script I have set up this notification:

Notification (Constants.FA_Note_PostActiveDocChange, true); 


I have now noticed that this is also triggered (executing the Note function) in the following situation:

  • Script is active in a dialgogue, which stays open (is palette). It remembers the 'current' location in the user document to be able to restore it after changes in the document by the script.
  • I switch to the document and do some text editing. Normally I do not need a screen refresh and can then proceed to the palette of the script.
  • If I do a screen refresh (CTRL +l) the notification triggers and the script restores the last 'current location'. In most cases this is the start of the document.

My questions are:

  • Is a sceen referesh really a 'change in the document' and thus the behaviour correct?
  • Or is this my mis-interpetation of FA_Note_PostActiveDocChange ?
  • Or am I the victim of an unsharp defintion of FA_Note_PostActiveDocChange ?

Thanks for any thoughts about this.

Klaus

TOPICS
Scripting

Views

402

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jul 11, 2016 Jul 11, 2016

There seem to be some hidden conditions which set the 'dirty flag'.

I tested the following with a new (empty) document and assured that the save icon is dimmed (document is 'clean').

The document is considered changed (save icon is lit).

  • Screen refresh by CTRL+l or via menu
  • Switch to master pages - or back to body pages
  • Switch to reference paes - or back to body pages

It turns out that this happens since FM 7.2.

Switching between page types in a script using FCodes does not change the 'dirty flag'.

A si

...

Votes

Translate

Translate
Community Expert ,
Jul 11, 2016 Jul 11, 2016

Copy link to clipboard

Copied

LATEST

There seem to be some hidden conditions which set the 'dirty flag'.

I tested the following with a new (empty) document and assured that the save icon is dimmed (document is 'clean').

The document is considered changed (save icon is lit).

  • Screen refresh by CTRL+l or via menu
  • Switch to master pages - or back to body pages
  • Switch to reference paes - or back to body pages

It turns out that this happens since FM 7.2.

Switching between page types in a script using FCodes does not change the 'dirty flag'.

A simple script reading from the reference page does not change the 'dirty flag'.

I have carefully checked the complete script - the flag is set as soon as the dialgoue is set up complete and becomes visible.

So I will leave the things as they are and do not further investigat in the script.

Thanks for listening!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines