🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.framemaker.sgml
Article #747

Problem with F_ApiAddText() after F_ApiPaste()

#747
From: Stanislav_Kurik
Date: Tue, 05 Aug 2008 15:00
34 lines
1614 bytes
Hello,

I've some troubles adding text to structured document after I paste some text from clipboard into it. Here it is how it goes in the code:

...

F_ApiSetTextRange(FV_SessionId, m_docId, FP_TextSelection, &tr);
F_ApiPaste(m_docId, 0);
F_ApiPopClipboard();

...

F_TextLoc addLoc;
addLoc.objId = m_paragraphId;
addLoc.offset = tr.beg.offset + pastedObjectLen;

F_ApiAddText(m_docId, &addLoc, newText);

The object from clipboard (in fact it's cross-reference) is pasted correctly to the right position but no text is added from then on.

pastedObjectLen is length of the cross-reference text (including the element begin/end tags)

I tried more variations of the line:
addLoc.offset = tr.beg.offset + 1;
addLoc.offset = tr.beg.offset + 2;
...

But nothing works.

Can somebody see where the problem lies?

I'm using FrameMaker8.

Thank you!
Technical Details
Message-ID: <59b60d9f.-1@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nac.net!feeder.erje.net!news.motzarella.org!motzarella.org!news4us.nl!webcrossing

Show Full Headers
Complete Article Headers
X-Google-Thread: fcc08,7ddfef38ebf755b2,start
X-Google-Attributes: gidfcc08,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: Stanislav_Kurik@adobeforums.com
Newsgroups: adobe.framemaker.sgml
Subject: Problem with F_ApiAddText() after F_ApiPaste()
Message-ID: <59b60d9f.-1@webcrossing.la2eafNXanI>
Date: Tue, 5 Aug 2008 08:00:05 -0700
Lines: 33
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nac.net!feeder.erje.net!news.motzarella.org!motzarella.org!news4us.nl!webcrossing
X-Original-Lines: 37
X-Original-Bytes: 1361