View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0011484 | Scribus | Scripter | public | 2013-04-05 17:50 | 2013-06-24 05:32 |
Reporter | hwsd | Assigned To | jghali | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | WIN32 | OS | Windows XP | OS Version | SP3 |
Product Version | 1.4.2 | ||||
Fixed in Version | 1.4.3.svn | ||||
Summary | 0011484: scripter's createMasterPage() documentation is incorrect | ||||
Description | - Call createMasterPage() from script - Create an object (Text or image frame) - Call closeMasterpage() The object is placed on current document page and not in just created Masterpage. - Call createMasterPage() from script - Call closeMasterpage() - Call editMasterPage() on just created Masterpage - Create an object (Text or image frame) - Call closeMasterpage() The object is placed on current document page and not in just created Masterpage. - Create a new Masterpage from Scribus UI - Call editMasterPage() from script and edit just created Masterpage - Create an object (Text or image frame) - Call closeMasterpage() The object is placed on just created Masterpage. See attached script. | ||||
Tags | No tags attached. | ||||
Patch | |||||
|
bugmp.py (985 bytes)
import sys try: import scribus except ImportError,err: print "This script must be run within Scribus." sys.exit(1) def main(argv): """ Test function: Master pages just created not edited. """ try: scribus.createMasterPage('Test') #scribus.closeMasterPage() #scribus.editMasterPage('Test') w, h = scribus.getPageSize() scribus.createText(0.0,0.0,w,h,'test_frame') scribus.setText('Hello from the Master Page!','test_frame') finally: scribus.closeMasterPage() def main_wrapper(argv): """ Boiler plate from /share/samples/boilerplate.py """ try: scribus.statusMessage("Running script...") scribus.progressReset() main(argv) finally: if scribus.haveDoc(): scribus.setRedraw(True) scribus.statusMessage("") scribus.progressReset() if __name__ == '__main__': main_wrapper(sys.argv) |
|
The bug is obvious and is in your script. With line 17 commented out, there is no chance your script may work. Also this is not a support forum. This non issue should have stayed on mailing list. You posted a message on mailing list and have not even waited for an answer... |
|
Dear jghali, I wrote to mailing list to search if someone know a workaround and post here because it's a bug. Documentation tell: createMasterPage(...) createMasterPage(pageName) Creates a new master page named pageName and opens it for editing. ...so reading documentation editMasterPage() is implicit in createMasterPage() otherwise the bug isn't in scribus but in documentation. Commented lines was an attempt to search a workaround. The commented workaround sometimes work and sometimes don't work but I haven't found reproducibility systematic. |
|
>> I wrote to mailing list to search if someone know a workaround and post here because it's a bug. Sorry but that does not preclude the fact that you posted on mailing list then there without even waiting for an answer to your ml post. Consequence : your issue description was obviously wrong, as there was an equally obvious issue in your script. Any issue posted here must be very specific : any issue not specific enough will have the same fate as yours, ie it will be closed. But true, there is an issue in the api documentation. The correct sequence for creating a master page object is : createMasterPage(pageName) editMasterPage(pageName) ... closeMasterPage() |
|
Sorry but my description wasn't wrong: If a software work different than described in documentation there is a bug, specially if what described in documentation has sense. |
|
It was wrong as the initial description didn't mentioned documentation at all. And the issue was the documentation. |
|
You're right about the non-mention of the documentation but not on the suitability to no create this bug report. Now we have to stop this discussion, at this point is useless to continue. Thanks to you for all. |
Date Modified | Username | Field | Change |
---|---|---|---|
2013-04-05 17:50 | hwsd | New Issue | |
2013-04-05 17:50 | hwsd | File Added: bugmp.py | |
2013-04-05 19:38 | jghali | Note Added: 0030037 | |
2013-04-05 19:38 | jghali | Status | new => resolved |
2013-04-05 19:38 | jghali | Resolution | open => no change required |
2013-04-05 19:38 | jghali | Assigned To | => jghali |
2013-04-05 19:38 | jghali | Status | resolved => closed |
2013-04-08 08:33 | hwsd | Note Added: 0030055 | |
2013-04-08 08:33 | hwsd | Status | closed => feedback |
2013-04-08 08:33 | hwsd | Resolution | no change required => reopened |
2013-04-08 12:18 | jghali | Summary | createMasterPage() and editMasterPage() don't permit to edit a new masterpage created from script. => scripter's createMasterPage() doc is incorrect |
2013-04-08 12:48 | jghali | Note Added: 0030057 | |
2013-04-08 12:49 | jghali | Summary | scripter's createMasterPage() doc is incorrect => scripter's createMasterPage() documentation is incorrect |
2013-04-08 12:50 | jghali | Status | feedback => resolved |
2013-04-08 12:50 | jghali | Fixed in Version | => 1.4.3.svn |
2013-04-08 12:50 | jghali | Resolution | reopened => fixed |
2013-04-08 12:55 | jghali | Severity | major => minor |
2013-04-08 13:01 | hwsd | Note Added: 0030058 | |
2013-04-08 13:14 | jghali | Note Added: 0030059 | |
2013-04-08 13:14 | jghali | Note Edited: 0030059 | |
2013-04-08 13:17 | jghali | Note Edited: 0030059 | |
2013-04-08 13:36 | hwsd | Note Added: 0030060 | |
2013-06-24 05:32 | christoph_s | Status | resolved => closed |