Terry J. Reedy added the comment:

The _here methods are the event handlers for the right click context menu 
options. Set_breakpoint, as a separate method, is only needed in the 
restore_file_breaks (from breakpoint file) method. I gather that you are 
thinking of using set/clear_breakpoint when a line number is clicked.

You have elsewhere suggested a different refactoring - replacing set and clear 
with toggle. That seems plausible as a good idea.  If text will have no 
breakpoints set after 
   self.text.update() # this enables setting "BREAK" tags to be visible
in restore_file_breaks(), there would be no problem. If not, toggle would need 
a force_set option. We need to know when the circumstances of when 
restore_file_breaks is called.

The bell is both undependable and uniformative. If breakpoints are not allowed 
for unnamed files, the context menu items should be grayed out (if possible, as 
done, for instance, for 'cut' when there is no selectionj).  If a line numbers 
is clicked for unnamed, we should display a message box explaining.

----------
stage:  -> needs patch
type:  -> enhancement

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22083>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to