Re: PythonCard dialogs -- return values

Phil Edwards <[email protected]>
Newsgroups gmane.comp.python.pythoncard
Message-ID <[email protected]>
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

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.