[Scribus] different paragraph-Styles from scripter (1.3)

Craig Ringer craig
Fri Oct 21 13:32:17 CEST 2005


Ralf-Diether Ebel wrote:

>>Yep. setStyle(...) will only apply its effects to a selection if no
>>object target is given. I realise that's surprising, but it's
>>consistent with the rest of the API, and until/unless we can perhaps
>>provide a more OO API it's likely to stay like that.
>>
>>Unfortunately, that doesn't seem to be working right now. I'm unsure
>>of why that is. It seems to be a problem with selecting the text range
>>rather than with applying the style, as if I hand-select the range it
>>all works fine. I'm using current "great breakage" CVS not anoncvs, so
>>it's entirely possible this is a problem you won't have. Please let me
>>know.
>>    
>>
>With me it's also now working, using anoncvs, even if i give no object in 
>the setStyle. 
>  
>
I assume you meant to write "not" working?

If so, OK ... I'll check it out when I get some time. It most likely 
won't get fixed until the "great breakage" is over and we can re-sync 
CVS without screams of pain and horror ;-)

>>On a side note, would you find something like this more friendly
>>(extended example):
>>
>>doc = scribus.documents.currentDocument()
>>ob = doc.newTextFrame(100,100,100,100,doc.currentPage)
>>ob.text = "ABC\nfred\n"
>>par0 = ob.selectText(0,3)   # select first paragraph
>>par0.style = doc.styles["fred"]
>>par1and2.style = doc.styles.defaultStyle()
>>ob.text += "More text\n"
>>ob.paragraph[2].paragraphStyle = doc.styles["wilma"]
>>    
>>
>Thanks,
>will try it
>  
>
Er... no. That's what I'd /like/ to do. It won't currently work; there 
is no current interface in Scribus that will permit you to do that.

--
Craig Ringer




More information about the scribus mailing list