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

Display of found object disappears

Community Expert ,
Dec 10, 2020 Dec 10, 2020

Copy link to clipboard

Copied

Dear experts,

My FindSomething function is quite successful. The found objects are always selected and hence I have a visible clue what was found. Three objects, however loose their selection as soon as the button function is left:

  • Automatic Hyphen: the cursor is just behind it (UI selects the hyphen)
  • Object style override: I do not see what is the object (UI selects the object: frame, graphic)
  • Object Style tag (UI selects the object: frame, graphic)

 

 

 

KLD_F.ButtonFind = function () { // =========================
var oTR, iFindType, iFS, iFV, iMode, sSearch, bWord, bCase, bBack;
// ...
$.bp(true);
  oTR = KLD_F.FindSomething (iFS, iFV, sSearch, iMode, bWord, bCase, bBack);
  if (oTR == undefined) {
    alert ("Object not found");
    return;
  }
} //--- end of ButtonFind -----------------------------------

 

 

 

When stepping through the function the selection disappears as soon as I reach the last line.

What happens here?

Additional observations for AutoHyphen (2020-12-10 12:43)

  • The cursor at the location after the found for AutoHyphen does not blink. It blinks only after a screen refresh (CTRL+l).
  • The reported oTR.beg.offset is the same as oTR.end.offset. When reducing the beg.offset to be one and then setting the TextSelection to this modifies oTR also the character before the AutoHyphen is selected.
TOPICS
Scripting

Views

129

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
Community Expert ,
Dec 17, 2020 Dec 17, 2020

Copy link to clipboard

Copied

LATEST

For the 'non-indication of the automatic hyphen I have found a solution:

At the end of the find process - before leaving function ButtonFind - I issue a KB  command "SelectPreviousCharacter". This makes the hyphen visible.

I have however not the tiniest idea how to handle the situation for a found Object tag or a found Object style override. Although I get a valid TextRange, its components are invalid:

find-problem-invalid-object.png

  • The Find process scrolls to the object (page), but I do not see the cursor nor anything selected.
  • How does the standard UI handle this?
  • Object Tag and Object style override are not handled in the FDK documentation (FM15, FM-16). So I can not get any information on this …

Any input is highly welcome!

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