From: Phil E. <ph...@li...> - 2007-10-31 08:59:46
|
Aaron Stevens wrote: > > For example, when I used the FileDialog, the result has members > 'accepted' and paths -- but according to the documentation these are > supposed to be mapped in a dict. Any clarification expected. > > result = dialog.fileDialog(self, 'Open', '', '', '*' ) > > if result.accepted == True: > filename = result.paths[0] > Hi Aaron: The documentation is simply out of date, that's all. The behaviour you describe is as expected - when version 0.8.2 (I think!) of PythonCard was released, the dialog components were changed so that they are sub-classes of wx.lib.dialogs. Where the documentation talks about a dictionary item, e.g. result['someName'], you just substitute result.someName. The change was designed to make some bits of PythonCard more 'pythonic' and to make it easier to hand-roll your own custom dialogs. -- Regards Phil Edwards Brighton, UK |