|
From: <ai...@us...> - 2013-11-20 06:24:24
|
Revision: 12722
http://sourceforge.net/p/plplot/code/12722
Author: airwin
Date: 2013-11-20 06:24:21 +0000 (Wed, 20 Nov 2013)
Log Message:
-----------
Use same method as tkdemos.tcl to distinguish between plserver and tclsh
or wish cases.
Modified Paths:
--------------
trunk/examples/tk/runAllDemos.tcl
Modified: trunk/examples/tk/runAllDemos.tcl
===================================================================
--- trunk/examples/tk/runAllDemos.tcl 2013-11-20 06:23:25 UTC (rev 12721)
+++ trunk/examples/tk/runAllDemos.tcl 2013-11-20 06:24:21 UTC (rev 12722)
@@ -11,17 +11,35 @@
set path [info script]
}
lappend auto_path [file join [file dirname $path] .. tcl]
-if {[catch {package require Plplotter}]} {
- # use non shared-lib way e.g. 'plserver'
- plstdwin .
- plxframe .p
- set plwin .p.plwin
- button .bnextpage -text "Page" -command [list event generate $plwin <Enter>]
-} else {
- plframe .p
- set plwin .p
- button .bnextpage -text "Page" -command [list $plwin nextpage]
+
+# In order to distinguish whether this is a plserver or wish
+# environment we assume that [info nameofexecutable] has the string
+# "plserver", "wish" or "tclsh" in it. Some contrived examples can be
+# figured out where this assumption is not correct, and for those
+# cases we simply emit an error message and return. But normally this
+# assumption is correct, and it is certainly correct for our tests.
+switch -glob -- [info nameofexecutable] {
+ "*plserver*" {
+ # use 'plserver' method
+ plstdwin .
+ plxframe .p
+ set plwin .p.plwin
+ button .bnextpage -text "Page" -command [list event generate $plwin <Enter>]
+ }
+ "*wish*" -
+ "*tclsh*" {
+ # use 'wish" method
+ plframe .p
+ set plwin .p
+ button .bnextpage -text "Page" -command [list $plwin nextpage]
+ }
+ default {
+ puts stderr "Error: argv0 = \"$argv0\"\ndoes not contain either the substrings \"plserver\", \"tclsh\", or \"wish\""
+ puts stderr "Therefore cannot decide how to proceed with runAllDemos.tcl so giving up"
+ return
+ }
}
+
grid .p -columnspan 5 -sticky news
grid rowconfigure . 0 -weight 1
for {set i 0} {$i < 5} {incr i} {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <arj...@us...> - 2013-11-21 12:43:14
|
Revision: 12732
http://sourceforge.net/p/plplot/code/12732
Author: arjenmarkus
Date: 2013-11-21 12:43:11 +0000 (Thu, 21 Nov 2013)
Log Message:
-----------
Call the plstdwin command to make sure that the demo window is properly sized.
Modified Paths:
--------------
trunk/examples/tk/runAllDemos.tcl
Modified: trunk/examples/tk/runAllDemos.tcl
===================================================================
--- trunk/examples/tk/runAllDemos.tcl 2013-11-21 11:06:09 UTC (rev 12731)
+++ trunk/examples/tk/runAllDemos.tcl 2013-11-21 12:43:11 UTC (rev 12732)
@@ -1,10 +1,10 @@
#----------------------------------------------------------------------------
# Source this file into a working Tk interpreter to run all the Tcl demos
# in a nice window with buttons for each demo you'd like to run.
-#
+#
# Vince Darley
# vi...@sa...
-#
+#
#----------------------------------------------------------------------------
if {[catch {file readlink [info script]} path]} {
@@ -29,6 +29,7 @@
"*wish*" -
"*tclsh*" {
# use 'wish" method
+ plstdwin .
plframe .p
set plwin .p
button .bnextpage -text "Page" -command [list $plwin nextpage]
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <arj...@us...> - 2013-11-22 13:32:48
|
Revision: 12738
http://sourceforge.net/p/plplot/code/12738
Author: arjenmarkus
Date: 2013-11-22 13:32:42 +0000 (Fri, 22 Nov 2013)
Log Message:
-----------
Run the full set of examples
Modified Paths:
--------------
trunk/examples/tk/runAllDemos.tcl
Modified: trunk/examples/tk/runAllDemos.tcl
===================================================================
--- trunk/examples/tk/runAllDemos.tcl 2013-11-22 13:21:08 UTC (rev 12737)
+++ trunk/examples/tk/runAllDemos.tcl 2013-11-22 13:32:42 UTC (rev 12738)
@@ -88,7 +88,7 @@
}
}
-for {set i 1} {$i <= 19} {incr i} {
+for {set i 0} {$i <= 33} {incr i} {
set demo x[format "%02d" $i]
button .b$i -text "Demo $i" -command [list run $demo]
lappend demos $demo
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <arj...@us...> - 2013-12-03 11:49:18
|
Revision: 12804
http://sourceforge.net/p/plplot/code/12804
Author: arjenmarkus
Date: 2013-12-03 11:49:15 +0000 (Tue, 03 Dec 2013)
Log Message:
-----------
Grey out several examples in the full set. These either do not work or have not been propagated yet. The variable greyedOut holds the list of these examples.
Modified Paths:
--------------
trunk/examples/tk/runAllDemos.tcl
Modified: trunk/examples/tk/runAllDemos.tcl
===================================================================
--- trunk/examples/tk/runAllDemos.tcl 2013-12-02 07:43:42 UTC (rev 12803)
+++ trunk/examples/tk/runAllDemos.tcl 2013-12-03 11:49:15 UTC (rev 12804)
@@ -7,6 +7,13 @@
#
#----------------------------------------------------------------------------
+#
+# Set of disabled examples:
+# examples 14 and 31 do not work properly
+# example 32 has deliberately (not yet) been propagated to all languages
+#
+set greyedOut {14 31 32}
+
if {[catch {file readlink [info script]} path]} {
set path [info script]
}
@@ -54,8 +61,14 @@
if {$tcl_platform(platform) != "unix"} {
button .cshell -text "Shell" -command "console show"
}
-button .creload -text "Reload" -command reload
+#
+# The reload button is probably not very useful to most users
+# as it reloads the set of demos and commands. So disable it
+# at least the time being
+#
+button .creload -text "Reload" -command reload -state disabled
+
set buttons [concat [info commands .c*] .bnextpage]
proc reload {} {
@@ -83,8 +96,13 @@
}
proc setButtonState {state} {
+ global greyedOut
foreach b [info commands .b*] {
- $b configure -state $state
+ if { [lsearch $greyedOut [string range $b 2 end]] < 0 } {
+ $b configure -state $state
+ } else {
+ $b configure -state disabled
+ }
}
}
@@ -99,6 +117,10 @@
}
}
+foreach i $greyedOut {
+ .b$i configure -state disabled
+}
+
if {[llength $buttons]} {
eval grid $buttons -sticky ew
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <arj...@us...> - 2014-01-23 14:07:11
|
Revision: 12955
http://sourceforge.net/p/plplot/code/12955
Author: arjenmarkus
Date: 2014-01-23 14:07:07 +0000 (Thu, 23 Jan 2014)
Log Message:
-----------
(plplotbugs #142) First step to making the pausing more consistent. With this change the demos run via the runAllDemos.tcl program wait after each page, with a message at the bottom of what is expected.
The behaviour in the Pltk package is controlled via the -eopcmd/-bopcmd options to the plframe widget.
Modified Paths:
--------------
trunk/examples/tk/runAllDemos.tcl
Modified: trunk/examples/tk/runAllDemos.tcl
===================================================================
--- trunk/examples/tk/runAllDemos.tcl 2014-01-22 23:43:10 UTC (rev 12954)
+++ trunk/examples/tk/runAllDemos.tcl 2014-01-23 14:07:07 UTC (rev 12955)
@@ -37,7 +37,7 @@
"*tclsh*" {
# use 'wish" method
plstdwin .
- plframe .p
+ plframe .p -eopcmd waitForReturn
set plwin .p
button .bnextpage -text "Page" -command [list $plwin nextpage]
}
@@ -48,6 +48,16 @@
}
}
+bind $plwin <Key-Return> stopWaiting
+
+proc stopWaiting {} {
+ set ::waitForReturn 1
+}
+proc waitForReturn {} {
+ .l configure -text "Press <enter> for the next page or complete the program"
+ vwait ::waitForReturn
+}
+
grid .p -columnspan 5 -sticky news
grid rowconfigure . 0 -weight 1
for {set i 0} {$i < 5} {incr i} {
@@ -81,7 +91,7 @@
proc run {demo} {
global plwin
- $plwin configure -eopcmd [list .bnextpage configure -state normal]
+ $plwin configure -eopcmd waitForReturn
.l configure -text "Starting $demo"
setButtonState disabled
update idletasks
@@ -89,6 +99,7 @@
if {[catch {$demo $plwin} err]} {
puts stderr $err
}
+ $plwin configure -eopcmd [list .bnextpage configure -state normal]
$plwin cmd pleop
.l configure -text "$demo complete"
setButtonState normal
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|