Tk Source Code

Check-in [8ef7384b]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:[Bug 1945073]: Demo square.tcl cannot run; need package tktest
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core-8-5-branch
Files: files | file ages | folders
SHA1: 8ef7384bc924a7b400e0b9fd11484fecb6b7f886
User & Date: jan.nijtmans 2011-11-22 17:07:03
Context
2011-12-22
18:42
3235256 - Keep menu entry IDs out of system values. Thanks Colin McDonald. check-in: 39071084 user: dgp tags: core-8-5-branch
2011-11-22
17:12
[Bug 1945073]: Demo square.tcl cannot run; need package tktest check-in: 174503e2 user: jan.nijtmans tags: trunk
17:07
[Bug 1945073]: Demo square.tcl cannot run; need package tktest check-in: 8ef7384b user: jan.nijtmans tags: core-8-5-branch
16:53
[Bug 1945073]: Demo square.tcl cannot run; need package tktest check-in: 43a8cf52 user: jan.nijtmans tags: core-8-4-branch
2011-11-17
21:17
merge-mark check-in: f6ea7ec0 user: jan.nijtmans tags: core-8-5-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ChangeLog.













1
2
3
4
5
6
7












2011-11-17  Alexandre Ferrieux  <[email protected]>

	* generic/tkCanvas.c: [Bug 3437816]: Missing TCL_ERROR return
	in [canvas lower].

2011-11-08  Reinhard Max  <[email protected]>

>
>
>
>
>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
2011-11-22  Jan Nijtmans  <[email protected]>

	* doc/wish.1: Use the same shebang comment everywhere.
	* library/demos/hello
	* library/demos/rmt
	* library/demos/square
	* library/demos/tcolor
	* library/demos/timer
	* library/demos/widget
	* unix/Makefile.in: [Bug 1945073]: Demo square.tcl
	* win/Makefile.in: cannot run; need package tktest

2011-11-17  Alexandre Ferrieux  <[email protected]>

	* generic/tkCanvas.c: [Bug 3437816]: Missing TCL_ERROR return
	in [canvas lower].

2011-11-08  Reinhard Max  <[email protected]>

Changes to doc/wish.1.

162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
can be accessed with a short file name.
.PP
An even better approach is to start your script files with the
following three lines:
.CS
\fB#!/bin/sh
# the next line restarts using wish \e
exec wish "$0" "$@"\fR
.CE
This approach has three advantages over the approach in the previous
paragraph.  First, the location of the \fBwish\fR binary does not have
to be hard-wired into the script:  it can be anywhere in your shell
search path.  Second, it gets around the 30-character file name limit
in the previous approach.
Third, this approach will work even if \fBwish\fR is







|







162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
can be accessed with a short file name.
.PP
An even better approach is to start your script files with the
following three lines:
.CS
\fB#!/bin/sh
# the next line restarts using wish \e
exec wish "$0" ${1+"$@"}\fR
.CE
This approach has three advantages over the approach in the previous
paragraph.  First, the location of the \fBwish\fR binary does not have
to be hard-wired into the script:  it can be anywhere in your shell
search path.  Second, it gets around the 30-character file name limit
in the previous approach.
Third, this approach will work even if \fBwish\fR is

Changes to library/demos/hello.

1
2
3
4
5
6
7
8
9
10
#!/bin/sh
# the next line restarts using wish \
exec wish "$0" "$@"

# hello --
# Simple Tk script to create a button that prints "Hello, world".
# Click on the button to terminate the program.

package require Tk



|







1
2
3
4
5
6
7
8
9
10
#!/bin/sh
# the next line restarts using wish \
exec wish "$0" ${1+"$@"}

# hello --
# Simple Tk script to create a button that prints "Hello, world".
# Click on the button to terminate the program.

package require Tk

Changes to library/demos/rmt.

1
2
3
4
5
6
7
8
9
10
#!/bin/sh
# the next line restarts using wish \
exec wish "$0" "$@"

# rmt --
# This script implements a simple remote-control mechanism for
# Tk applications.  It allows you to select an application and
# then type commands to that application.

package require Tcl 8.4


|







1
2
3
4
5
6
7
8
9
10
#!/bin/sh
# the next line restarts using wish \
exec wish "$0" ${1+"$@"}

# rmt --
# This script implements a simple remote-control mechanism for
# Tk applications.  It allows you to select an application and
# then type commands to that application.

package require Tcl 8.4

Changes to library/demos/square.

1
2
3
4
5
6
7
8
9
10
#!/bin/sh
# the next line restarts using wish \
exec wish "$0" "$@"

# square --
# This script generates a demo application containing only a "square"
# widget.  It's only usable in the "tktest" application or if Tk has
# been compiled with tkSquare.c. This demo arranges the following
# bindings for the widget:
# 


|







1
2
3
4
5
6
7
8
9
10
#!/bin/sh
# the next line restarts using wish \
exec wish "$0" ${1+"$@"}

# square --
# This script generates a demo application containing only a "square"
# widget.  It's only usable in the "tktest" application or if Tk has
# been compiled with tkSquare.c. This demo arranges the following
# bindings for the widget:
# 

Changes to library/demos/tcolor.

1
2
3
4
5
6
7
8
9
10
#!/bin/sh
# the next line restarts using wish \
exec wish "$0" "$@"

# tcolor --
# This script implements a simple color editor, where you can
# create colors using either the RGB, HSB, or CYM color spaces
# and apply the color to existing applications.

package require Tk 8.4


|







1
2
3
4
5
6
7
8
9
10
#!/bin/sh
# the next line restarts using wish \
exec wish "$0" ${1+"$@"}

# tcolor --
# This script implements a simple color editor, where you can
# create colors using either the RGB, HSB, or CYM color spaces
# and apply the color to existing applications.

package require Tk 8.4

Changes to library/demos/timer.

1
2
3
4
5
6
7
8
9
10
#!/bin/sh
# the next line restarts using wish \
exec wish "$0" "$@"

# timer --
# This script generates a counter with start and stop buttons.

package require Tcl 8.4
package require Tk



|







1
2
3
4
5
6
7
8
9
10
#!/bin/sh
# the next line restarts using wish \
exec wish "$0" ${1+"$@"}

# timer --
# This script generates a counter with start and stop buttons.

package require Tcl 8.4
package require Tk

Changes to library/demos/widget.

1
2
3
4
5
6
7
8
9
10
#!/bin/sh
# the next line restarts using wish \
exec wish "$0" "$@"

# widget --
# This script demonstrates the various widgets provided by Tk, along with many
# of the features of the Tk toolkit. This file only contains code to generate
# the main window for the application, which invokes individual
# demonstrations. The code for the actual demonstrations is contained in
# separate ".tcl" files is this directory, which are sourced by this script as


|







1
2
3
4
5
6
7
8
9
10
#!/bin/sh
# the next line restarts using wish \
exec wish "$0" ${1+"$@"}

# widget --
# This script demonstrates the various widgets provided by Tk, along with many
# of the features of the Tk toolkit. This file only contains code to generate
# the main window for the application, which invokes individual
# demonstrations. The code for the actual demonstrations is contained in
# separate ".tcl" files is this directory, which are sourced by this script as

Changes to unix/Makefile.in.

803
804
805
806
807
808
809



810

811
812
813
814
815
816
817
	    if [ -f $$i ] ; then \
		sed -e '3 s|exec wish|exec wish$(VERSION)|' \
			$$i > "$(DEMO_INSTALL_DIR)"/`basename $$i`; \
	    fi; \
	    done;
	@for i in $(DEMOPROGS); \
	    do \



	    chmod 755 "$(DEMO_INSTALL_DIR)"/$$i; \

	    done;
	@echo "Installing demo images";
	@for i in $(TOP_DIR)/library/demos/images/*; \
	    do \
	    if [ -f $$i ] ; then \
		$(INSTALL_DATA) $$i "$(DEMO_INSTALL_DIR)"/images; \
		fi; \







>
>
>

>







803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
	    if [ -f $$i ] ; then \
		sed -e '3 s|exec wish|exec wish$(VERSION)|' \
			$$i > "$(DEMO_INSTALL_DIR)"/`basename $$i`; \
	    fi; \
	    done;
	@for i in $(DEMOPROGS); \
	    do \
	    if test $$i = "square"; then \
	    rm -f  "$(DEMO_INSTALL_DIR)"/$$i; \
	    else \
	    chmod 755 "$(DEMO_INSTALL_DIR)"/$$i; \
	    fi; \
	    done;
	@echo "Installing demo images";
	@for i in $(TOP_DIR)/library/demos/images/*; \
	    do \
	    if [ -f $$i ] ; then \
		$(INSTALL_DATA) $$i "$(DEMO_INSTALL_DIR)"/images; \
		fi; \

Changes to win/Makefile.in.

552
553
554
555
556
557
558
559
560
561
562
563
564



565

566
567
568
569
570
571
572
		else true; \
		fi; \
	    done;
	@echo "Installing demos to $(SCRIPT_INSTALL_DIR)/demos/";
	@for i in $(ROOT_DIR)/library/demos/*; \
	    do \
	    if [ -f $$i ] ; then \
		sed -e '3 s|exec $(WISH)|exec $(WISH)|' \
			$$i > $(SCRIPT_INSTALL_DIR)/demos/`basename $$i`; \
	    fi; \
	    done;
	@for i in $(DEMOPROGS); \
	    do \



	    chmod 755 $(SCRIPT_INSTALL_DIR)/demos/$$i; \

	    done;
	@echo "Installing demo images";
	@for i in $(ROOT_DIR)/library/demos/images/*; \
	    do \
	    if [ -f $$i ] ; then \
		$(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR)/demos/images; \
		fi; \







|





>
>
>

>







552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
		else true; \
		fi; \
	    done;
	@echo "Installing demos to $(SCRIPT_INSTALL_DIR)/demos/";
	@for i in $(ROOT_DIR)/library/demos/*; \
	    do \
	    if [ -f $$i ] ; then \
		sed -e '3 s|exec wish|exec wish$(VER)|' \
			$$i > $(SCRIPT_INSTALL_DIR)/demos/`basename $$i`; \
	    fi; \
	    done;
	@for i in $(DEMOPROGS); \
	    do \
	    if test $$i = "square"; then \
	    rm -f  $(SCRIPT_INSTALL_DIR)/demos/$$i; \
	    else \
	    chmod 755 $(SCRIPT_INSTALL_DIR)/demos/$$i; \
	    fi; \
	    done;
	@echo "Installing demo images";
	@for i in $(ROOT_DIR)/library/demos/images/*; \
	    do \
	    if [ -f $$i ] ; then \
		$(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR)/demos/images; \
		fi; \