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

FDK 7.1/FrameMaker 7.1 F_ApiDelete

New Here ,
Apr 01, 2008 Apr 01, 2008
Hello.

I thing we have found a bug in FDK7.1 or FrameMaker 7.1.
We have a table cell in which there is a lot of Markers and Graphics anchors.

See this:

TC
|-Marker
|-Graph
|-Graph
|-Marker
.
.
.

There is aproximatelly 10 Marker element and 20 Graph elements.

Now we programattically delete all Graph element. So we use recurisve function to get all Graph element and than call on each:
F_ApiDelete(docId, elemId).

But suprised some Marker elements where deletes also.
It looks like there is a problem with elements, that are only one byte textranges.

Than we have replaced F_ApiDelete with F_ApiDeleteText and it worked.
So problem is not in our algorithm but in F_ApiDelete function.

Maybe problem is caused by invalid structure, because Graph,Marker elements are not allowed in structure.

Is this know bug?

Regards Peter
TOPICS
Structured
732
Translate
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
Mentor ,
Apr 01, 2008 Apr 01, 2008
Hi Peter,

I have never known F_ApiDelete() to fail, whether or not on elements or other objects, and whether or not element structures are valid. I have used it for all these types of elements too. Are you absolutely sure your element IDs are valid? How are you obtaining them? Are you using the element tree to step through them with FP_FirstChildElement and FP_NextSiblingElement, etc.?

Russ
Translate
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
New Here ,
Apr 07, 2008 Apr 07, 2008
Hello.<br /><br />I am absolutly sure. First of all I am traversing trought elements using FP_FirstChildElement and FP_NextSiblingElement. And element ids (F_ObjHandleT) are stored in vector<F_ObjHandleT>.<br /><br />Than I call F_ApiDelete(ids) for each item in vector.<br /><br />As i said if I replace F_ApiDelete with F_ApiDeleteText, where textrange is:<br />tr.beg = F_ApiGetTextLoc( .. loc of marker, graphic)<br />tr.end = tr.beg<br />tr.end.offset++<br /><br />It works and deletes only correct elements.
Translate
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
Mentor ,
Apr 07, 2008 Apr 07, 2008
Ah, you got me thinking now. Is a Graph element a paragraph-containing element? The reason I ask is that a marker has to live in some paragraph, even if it is represented structurally as a sibling to a paragraph. I'm not quite sure of the exact logic, but I do know that if you put a marker as a sibling to paragraph-containing elements, its actual text location will end up within one of those paragraphs. Therefore, if you delete the paragraph element, maybe it will force a delete of the marker element as well.

I don't know this absolutely for sure, and I don't know if this is the problem you are seeing. Just an idea, really.

Russ
Translate
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
Mentor ,
Apr 08, 2008 Apr 08, 2008
As I think more on it, you could test this theory by manually deleting the Graph elements one by one, using the Structure View. If any Marker elements get deleted, it must be because the markers are living in a Graph element text range.
Translate
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
New Here ,
Apr 23, 2008 Apr 23, 2008
LATEST
Hello.

No Graph elements are FO_Graphic, and Markers are normal FO_Marker. But they all are in Table Cell element.

I will try to manually delete it in Structure view.
Translate
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