On Fri, 28 Oct 2011 16:11:57 -0500
Kent Tenney <[email protected]> wrote:
> On Fri, Oct 28, 2011 at 3:48 PM, SegundoBob <[email protected]> wrote:
>
> > In post 8 of this thread I suggest a way to address the problems you
> > pointed out, but Terry and Kent seem to reject these changes.  I look
> > forward to seeing how you will eventually fix the problems.
> 
> I didn't reject the corrections; since my clunky code worked for me, I
> left it alone.
> You could consider my stuff "pseudo-code"

Right, it seemed there were three issues concerning SegundoBob with the
g.openWithFileName script approach:

 1. Edward said it would destroy the universe
 2. Some logging output was ending up in the wrong logging pane
 3. Some error messages about updating a non-existent recent files
    menu were occurring

I wasn't seeing 2 or 3, and for 1, well, I'm just not as risk-averse as
Edward 8-)  Like Kent, I wasn't seeing any problems.

If you're seeing problems, particularly problems with occur with

g.openWithFileName('a.leo', c)
g.openWithFileName('b.leo', c)
g.openWithFileName('b.leo', c)
c.frame.bringToFront()
c.setLog()

and do not occur with

python launchLeo.py a.leo b.leo c.leo 

then g.openWithFileName() apparently only works in some cases, and
needs further examination.

I see your code calls g.doHook("after-create-leo-frame",c=cmdr), rather
than g.registerHandler('after-create-leo-frame',onCreate), which
suggests you're generating 'after-create-leo-frame' events rather than
responding to them - the system should generate them when an outline is
loaded, probably from near the end of g.openWithFileName()

You show your code in a button - calls to g.openWithFileName()
triggered when a user clicks on a button aren't reentrant, only calls
run on load from a @script node would be reentrant, so (1) may not
be relevant anyway.

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.

Reply via email to