On Sat, 30 Jan 2016 10:01:59 -0800 (PST) Richard Andersen <[email protected]> wrote:
> Hi Terry (and others), > > I see the script is from a while back, so perhaps something has > changed in the core which is causing an error for me. > > When I run it, I get this error... > > exception executing script > AttributeError: 'str' object has no attribute 'in_qt_dialog' > -------------------- > line 453: self.attachLeoIcon(d) > * line 454: c.in_qt_dialog = True So I fiddled around with this a lot: https://github.com/leo-editor/snippets/blob/master/scripts/output/outline2text.py because I was trying to get it to run in python 2/3 qt 4/5 (it does), and get it to handle an HTML template (gave up). So the above should work, although you may need to get the latest Leo code to get the preview view to work in Py 3 (just pushed a fix for leoscreen, the plugin that provides the viewer for the preview). All that said, I wonder if your problem is that c doesn't have it's usual value (the commander / outline) but was changed to a string (str) reference in your code? Cheers -Terry > line 455: obj = > d.getSaveFileName(parent,title,os.curdir,filter_) > line 456: c.in_qt_dialog = False > > ... immediately after the Dialog box comes up and I respond to either > option. > > Would appreciate any direction you can provide. > > -Richard > > On Thursday, October 6, 2011 at 10:19:48 AM UTC-7, Terry Brown wrote: > > > > On Thu, 6 Oct 2011 12:13:48 -0500 > > Terry Brown <[email protected] <javascript:>> wrote: > > > > > # filename = g.app.gui.runSaveFileDialog('Save to file') > > > filename = '/home/tbrown/Desktop/del.txt' > > > > whoops, of course that should be just > > > > filename = g.app.gui.runSaveFileDialog('Save to file') > > > > Cheers -Terry > > > > > -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
