textOverflows method: not doing what the docs say?

Previous topic - Next topic

henrylaw

The documentation at https://impagina.org/scribus-scripter-api/text-frame/#textoverflows says that the 'nolinks' parameter controls whether or not Scripter will look at the whole text chain for an overflow. I have a test case which suggests that it never does so; that you have specifically to look at the last frame to find out whether or not there is text overflow.

Run the attached script (after renaming it .py!) in the attached test case document. Run it from the command line, as it uses 'print()' to report what it's doing. You should see from the messages that the 'nolinks' parameter has no effect.

Am I doing something wrong?  I'll raise a defect report if not.

Scribus 1.7.1 svn running under Linux Mint 22.3.

(PS this might be crummy Python; I've been a Perl programmer to date!)

a.l.e

Hi,

I've checked in the code and nolinks does nothing.

The code processed seems to have been commented out 20 years ago...

The description of the argument is a bit cryptic, and I wonder a bit what its usage could have been.
I guess it's about finding out if a text frame in a chain is already filled.

If you have a "serious" use case, I can think of the best way to expose this information...
Otherwise, we should simply remove the argument from the documentation.

henrylaw

No, I'm happy that the reference to the "nolinks" argument be removed from the documentation; after twenty years it seems about right  :)

For anyone coming here trying to find out why their "nolinks" code doesn't work, I've got round it very easily by using "getLastLinkedFrame" to find the one that would show the overflow indication. One extra line of code.

a.l.e

I've made a patch to remove all traces of the argument from the code.

The docs @ impagina will be updated as soon as the update script is working again : - )

Edit: here is the link: https://bugs.scribus.net/view.php?id=18095