On Oct 22, 2:01 pm, jkn <[EMAIL PROTECTED]> wrote:

>     p = root.insertAsLastChild()
>   File "/transfer/qt-plugin/leo/core/leoNodes.py", line 2307, in
> insertAsLastChild
>     n = p.numberOfChildren()
>   File "/transfer/qt-plugin/leo/core/leoNodes.py", line 1263, in
> numberOfChildren
>     return len(p.v.t.children)
> AttributeError: 'NoneType' object has no attribute 't'

The fix is at rev 1362 of the qt-plugin branch.

Apparently, this bug happens only if

a) you don't specify a file name *and* there is no default
"workbook" .leo file or
b) you specify a non-existent .leo file.

The fix was to call createFirstTreeNode in leoQtFrame.finishCreate.
Rather than copying and pasting the (gui-independent) code from
leoTkinterFrame.py, I moved the method to the base leoFrame class; and
added createFirstTreeNode to the list of methods that must be defined
in the base class.  The unit test that tests such relationships is
happy.

Conceivably this fixes another bug, so let me know if there are other
problems.

Edward
--~--~---------~--~----~------------~-------~--~----~
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