On Tue, 18 Oct 2011 20:24:01 -0700 (PDT) SegundoBob <[email protected]> wrote:
> Edward, if I understand what you recently wrote here > > http://groups.google.com/group/leo-editor/tree/browse_frm/thread/c59056e1711a4d3d/9721eb4d31f1676e?rnum=11&_done=%2Fgroup%2Fleo-editor%2Fbrowse_frm%2Fthread%2Fc59056e1711a4d3d%3F#doc_76f3415c5b317ceb > > The use of g.openWithFileName() by Kent Tenney above is also a very > bad thing. It is in a loop and g.openWithFileName() will sometimes be > called while a g.openWithFileName() is already in progress. > > Am I missing something? Actually I came up with that code - there's no fundamental reason why you can't call a function from inside of itself, although in any particular case it may or may not work. Edward's suggestion was to trigger the subsequent file loading with the "after-create-leo-frame" callback, which "executes near the end of g.openWithFileName", i.e. is essentially calling g.openWithFileName from within itself anyway. I imagine the @script code executes near the end of g.openWithFileName also, so there may not be that much difference between the two, although after-create-leo-frame would be somewhat more complicated. The only actually reported issue with the save tabs script was the spreading out of log messages between various log panes, which may or may not be avoided by adding a c.setLog() call to the end of the script. Cheers -Terry -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en.
