incunabulum / guidata

Python library generating graphical user interfaces for easy dataset editing and display / From code.google.com
Other
0 stars 0 forks source link

FileWidget fails when embedded too far #15

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a DataSet with a FileItem in a Group in a TabGroup
2. Click the file chooser button

What is the expected output? What do you see instead?
AttributeError: parent doesn't have child_title

What version of the product are you using? On what operating system?
Windows XP, guidata 1.3.1

Please provide any additional information below.
Maybe need to search for a parent with child_title:

def _find_child_title(p):
    if p is None: return lambda x: ''
    try: return p.child_title
    except AttributeError: return _find_child_title(p.parent())
child_title = _find_child_title(parent)
fname = self.filedialog(parent, child_title(self.item), fname,
                        "\n".join(filter_lines))

instead of existing

try:
    child_title = parent.child_title
except AttributeError:
    child_title = parent.parent().child_title
fname = self.filedialog(parent, child_title(self.item), fname,
                        "\n".join(filter_lines))

Original issue reported on code.google.com by r.lup...@gmail.com on 10 Aug 2011 at 4:50

GoogleCodeExporter commented 9 years ago
This issue was updated by revision e9ad8072b283.

It must have been fixed in the meantime (see commit message).

Original comment by pierre.raybaut on 6 Nov 2012 at 4:42