How to follow the link chain?

Previous topic - Next topic

michaelu

Is there a function to get the textframe links, i.e. if frame A is linked to frame B, can I call something like getLinks(A) and get B back?
Are links 1:1 or 1:n? I suppose A may have only one link, but B may be the target of more than one frame?

a.l.e

hi michael

2. links are 1:1 (that was easy)

1. i'm not aware of a way for checking the relationship between a text frame and a chain of text frames.
   the exportAllText solves this (not really gracefully) by putting all the text in an array and checking if the "getAllText" in the current item is already in the list of contents.

it would be good if the API could be enhanced with a way to detect chains of texts.

i guess that the two functions

- getNextInChain() and
- getPreviousInChain()

returning the name of an item or Null would be what we need...

if you want to work on that i can look for the relevant parts in the scribus code...