From: stephen <st...@th...> - 2004-09-02 15:44:10
|
I'm using pythoncard 0.8 on windows. The documentation says "The fileDialog component returns two values, stored as elements of the Python dictionary", but it's returning something of type 'instance'. from PythonCard import model,dialog class Minimal(model.Background): ....def on_menuFileExit_select(self,event): ........self.Close() ....def on_menuFileOpen_select(self,event): ........wildcard = "*" ........encryptedfile = dialog.fileDialog(self, 'Open', '', '', wildcard ) ........print type(encryptedfile) ........print encryptedfile['paths'] if __name__ == '__main__': ....app = model.Application(Minimal) ....app.MainLoop() and the output is: <type 'instance'> Traceback (most recent call last): File "C:\Python23\lib\site-packages\PythonCard\menu.py", line 205, in _dispatch handler(background, aWxEvent) File "Display Encrypted.py", line 18, in on_menuFileOpen_select print encryptedfile['paths'] AttributeError: DialogResults instance has no attribute '__getitem__' _________ Stephen If your desktop gets out of control easily, you probably have too much stuff on it that doesn't need to be there. Donna Smallin, "Unclutter Your Home" |