This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: EditorWindow demo causes attr-error
Type: Stage:
Components: IDLE Versions: Python 2.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: kbk Nosy List: kbk, snow_k2
Priority: low Keywords:

Created on 2006-01-28 21:16 by snow_k2, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
EditorWindow.py snow_k2, 2006-01-28 21:16 EditorWindow.py
Messages (2)
msg27374 - (view) Author: snowman (snow_k2) Date: 2006-01-28 21:16
Running EditorWindow.py causes next error : 
>>>>>>>>>>
Traceback (most recent call last):
  File "C:\Python24\Lib\idlelib\EditorWindow.py", line 
1410, in -toplevel-
    test()
  File "C:\Python24\Lib\idlelib\EditorWindow.py", line 
1404, in test
    edit = EditorWindow(root=root, filename=filename)
  File "C:\Python24\Lib\idlelib\EditorWindow.py", line 
190, in __init__
    self.update_recent_files_list()
  File "C:\Python24\Lib\idlelib\EditorWindow.py", line 
602, in update_recent_files_list
    if self.top.hasattr('instance_dict'):
AttributeError: ListedToplevel instance has no 
attribute 'hasattr'
<<<<<<<

I think EditorWindow.update_recent_files_list() should
check the 'instance_dict' attribute existance before
accessing self.top.instance_dict.keys() in the def.

  if hasattr(self.top, 'instance_dict'):
    xxxxx
    xxxxx

msg27375 - (view) Author: Kurt B. Kaiser (kbk) * (Python committer) Date: 2006-07-24 18:06
Logged In: YES 
user_id=149084

Rev 50805
History
Date User Action Args
2022-04-11 14:56:15adminsetgithub: 42847
2006-01-28 21:16:00snow_k2create