aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFred Fish <fnf@specifix.com>1996-07-21 01:28:12 +0000
committerFred Fish <fnf@specifix.com>1996-07-21 01:28:12 +0000
commit396bf873e9623342c36343254b0a46d8415bae50 (patch)
tree56755ad229cd046ad77d745a90ffe308e39ab2cd
parent9422fadb91c568a976414bef7ea91e5832eab334 (diff)
downloadgdb-396bf873e9623342c36343254b0a46d8415bae50.zip
gdb-396bf873e9623342c36343254b0a46d8415bae50.tar.gz
gdb-396bf873e9623342c36343254b0a46d8415bae50.tar.bz2
* gdbtk.tcl (files_command): Reorder the binding tags for
the listbox widget to avoid referencing the listbox after the containing widget has been destroyed by the action of a previous binding.
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/gdbtk.tcl7
2 files changed, 13 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 4a26f00..d5102dc 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+Sat Jul 20 17:46:40 1996 Fred Fish <fnf@cygnus.com>
+
+ * gdbtk.tcl (files_command): Reorder the binding tags for
+ the listbox widget to avoid referencing the listbox after
+ the containing widget has been destroyed by the action of
+ a previous binding.
+
Sat Jul 20 10:41:06 1996 Fred Fish <fnf@cygnus.com>
* dwarf2read.c (struct filenames): Change internal "struct file"
diff --git a/gdb/gdbtk.tcl b/gdb/gdbtk.tcl
index 6d027cc..bd08669 100644
--- a/gdb/gdbtk.tcl
+++ b/gdb/gdbtk.tcl
@@ -2241,12 +2241,17 @@ proc files_command {} {
pack .files_window.close -side bottom -fill x -expand no -anchor s
pack .files_window.scroll -side right -fill both
pack .files_window.list -side left -fill both -expand yes
- bind .files_window.list <Any-ButtonRelease-1> {
+ bind .files_window.list <ButtonRelease-1> {
set file [%W get [%W curselection]]
gdb_cmd "list $file:1,0"
update_listing [gdb_loc $file:1]
destroy .files_window
}
+ # We must execute the listbox binding first, because it
+ # references the widget that will be destroyed by the widget
+ # binding for Button-Release-1. Otherwise we try to use
+ # .files_window.list after the .files_window is destroyed.
+ bind_widget_after_class .files_window.list
}
button .files -text Files -command files_command