[Scribus] different paragraph-Styles from scripter (1.3)
Mon Oct 24 11:36:20 CEST 2005
On 21 Oct 2005 19:32 Craig Ringer wrote:
> 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?
Yes, I meant that it's 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 ;-)
Ok, I file a bugreport!
> >>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.paragraphStyle = doc.styles["wilma"]
> >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.
Sorry, I read it a little in hurry. Sounds good to me, although I'm not so
familiar with python, just trying it. I guess I do many things to
0C9C 8A65 D8A9 2566 A4E0 3738 7F4C B1D8 E031 4065
More information about the scribus