Problem with API duplicateObject

Previous topic - Next topic

iKay

In my attempt to do some automation on scribus, I find that, the API duplicateObject() is not returning me the name of the duplicated object, though the document mentions it returs a string. Is it expected to return the name of the duplicated object? - I am getting None as return.

I am using 1.4.0 RC3 - Can somebody please clarify?

Thanks
iKay

a.l.e

well, the API does not say it will return the name of the created object...

but i agree with you that it should do it!

could you please fill a feature request to make sure that it will be done in the new scripter engine (which is currently being finished...)

for the time being, you can use the following workardound:

<pre>
scribus.duplicateObject();
newItem =  scribus.getSelectedObject();
</pre>

... after duplicating the item, scribus automatically selects the newly created one... (which is or is not what it should do... imo, it should not to do it, since it's a side effect... a mostly welcome one, but still a side effect!)

Wena

I am new to all this, what is an API?

Wena