This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
[PATCH] Error: bad option "-modal": must be -default, -icon, -message, -parent, -title, or -type
- From: Craig Hackney <craig at triscend dot com>
- To: "'insight at sources dot redhat dot com'" <insight at sources dot redhat dot com>
- Date: Wed, 1 May 2002 15:59:50 -0700
- Subject: [PATCH] Error: bad option "-modal": must be -default, -icon, -message, -parent, -title, or -type
The above error message is displayed on Windows hosts if the
connection to a remote target fails. The patch below uses the
ide_messageBox call for Windows hosts to display the target
connection error window. Unix systems still use the tk_messageBox
call.
Index: interface.tcl
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/interface.tcl,v
retrieving revision 1.43
diff -c -p -r1.43 interface.tcl
*** interface.tcl 26 Apr 2002 21:09:54 -0000 1.43
--- interface.tcl 1 May 2002 17:17:57 -0000
*************** proc set_target_name {{prompt 1}} {
*** 1074,1080 ****
# PROC: set_target - Change the target
# ------------------------------------------------------------------
proc set_target {} {
! global gdb_target_cmd gdb_target_changed gdb_pretty_name gdb_target_name
# debug "gdb_target_changed=$gdb_target_changed
gdb_target_cmd=\"$gdb_target_cmd\""
# debug "gdb_target_name=$gdb_target_name"
if {$gdb_target_cmd == "" && ![TargetSelection::native_debugging]} {
--- 1074,1080 ----
# PROC: set_target - Change the target
# ------------------------------------------------------------------
proc set_target {} {
! global gdb_target_cmd gdb_target_changed gdb_pretty_name gdb_target_name
tcl_platform
# debug "gdb_target_changed=$gdb_target_changed
gdb_target_cmd=\"$gdb_target_cmd\""
# debug "gdb_target_name=$gdb_target_name"
if {$gdb_target_cmd == "" && ![TargetSelection::native_debugging]} {
*************** proc set_target {} {
*** 1109,1118 ****
update
set dialog_title "GDB"
set debugger_name "GDB"
! tk_messageBox -icon error -title $dialog_title -type ok \
! -modal task -message "$msg\n\n$debugger_name cannot connect to the
target board\
using [lindex $gdb_target_cmd 1].\nVerify that the board is securely
connected and, if\
necessary,\nmodify the port setting with the debugger preferences."
return ERROR
}
--- 1109,1125 ----
update
set dialog_title "GDB"
set debugger_name "GDB"
! if {$tcl_platform(platform) == "windows"} {
! ide_messageBox [list set r] -icon error -title $dialog_title
-type ok \
! -modal system -message "$msg\n\n$debugger_name cannot connect to
the target board\
using [lindex $gdb_target_cmd 1].\nVerify that the board is securely
connected and, if\
necessary,\nmodify the port setting with the debugger preferences."
+ } else {
+ tk_messageBox -icon error -title $dialog_title -type ok \
+ -modal system -message "$msg\n\n$debugger_name cannot connect to
the target board\
+ using [lindex $gdb_target_cmd 1].\nVerify that the board is securely
connected and, if\
+ necessary,\nmodify the port setting with the debugger preferences."
+ }
return ERROR
}
----------------------------------------------------------------------
/\ Craig Hackney TEL: 650-968-8668 x171
/\/ \ Triscend Corporation FAX: 650-934-9393
/\/ / \ 301 North Whisman Road mailto:craig@triscend.com
/ / / \ Mountain View, CA 94043 http://www.triscend.com
----------------------------------------------------------------------