Check-in [f841a312f7]

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

Overview
Comment:Improve examples.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: f841a312f79333a39dcd85fbc14a9460df168941
User & Date: stu 2014-10-22 06:24:12
Context
2014-10-24
00:23
Link with all the needed libs. Adjust dist dir name. Leaf check-in: 54c378c9ed user: stu tags: trunk
2014-10-22
06:24
Improve examples. check-in: f841a312f7 user: stu tags: trunk
2014-10-21
05:35
Start testing. check-in: 02dabb0f9f user: stu tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to Makefile.in.

250
251
252
253
254
255
256
257




258
259
260
261
262
263
264
# Install examples.
# Cheat with datadir.
#========================================================================

install-examples:
	@$(INSTALL_DATA_DIR) $(DESTDIR)$(datadir)/examples/$(PACKAGE_TARNAME)
	@echo "Installing examples in $(DESTDIR)$(datadir)/examples/$(PACKAGE_TARNAME)"
	@list='demo.tcl embed_firefox.tcl playback.tcl script'; for i in $$list; do \




	    echo "Installing $$i"; \
	    $(INSTALL_DATA) $(srcdir)/examples/$$i $(DESTDIR)$(datadir)/examples/$(PACKAGE_TARNAME) ; \
	done

test: binaries libraries
	$(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS)








|
>
>
>
>







250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
# Install examples.
# Cheat with datadir.
#========================================================================

install-examples:
	@$(INSTALL_DATA_DIR) $(DESTDIR)$(datadir)/examples/$(PACKAGE_TARNAME)
	@echo "Installing examples in $(DESTDIR)$(datadir)/examples/$(PACKAGE_TARNAME)"
	@list='demo.tcl embed_firefox.tcl playback.tcl'; for i in $$list; do \
	    echo "Installing $$i"; \
	    $(INSTALL_SCRIPT) $(srcdir)/examples/$$i $(DESTDIR)$(datadir)/examples/$(PACKAGE_TARNAME) ; \
	done
	@list='script'; for i in $$list; do \
	    echo "Installing $$i"; \
	    $(INSTALL_DATA) $(srcdir)/examples/$$i $(DESTDIR)$(datadir)/examples/$(PACKAGE_TARNAME) ; \
	done

test: binaries libraries
	$(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS)

347
348
349
350
351
352
353
354
355
356
357




358
359
360
361
362
363
364
	    if test -d $(srcdir)/$$p ; then \
		$(INSTALL_DATA_DIR) $(DIST_DIR)/$$p; \
		$(DIST_INSTALL_DATA) $(srcdir)/$$p/*.* $(DIST_DIR)/$$p/; \
	    fi; \
	done

	$(INSTALL_DATA_DIR) $(DIST_DIR)/examples
	list='demo.tcl embed_firefox.tcl erxvt.broken playback.tcl script'; \
	for p in $$list; do \
	    $(DIST_INSTALL_SCRIPT) $(srcdir)/examples/$$p $(DIST_DIR)/examples/; \
	done





	$(INSTALL_DATA_DIR) $(DIST_DIR)/old
	list='build.SunOS.conf build.conf build.conf.ubuntu build.conf8.5 build.tcl pkgIndex.tcl tickmakefile'; \
	for p in $$list; do \
	    $(DIST_INSTALL_SCRIPT) $(srcdir)/old/$$p $(DIST_DIR)/old/; \
	done








|



>
>
>
>







351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
	    if test -d $(srcdir)/$$p ; then \
		$(INSTALL_DATA_DIR) $(DIST_DIR)/$$p; \
		$(DIST_INSTALL_DATA) $(srcdir)/$$p/*.* $(DIST_DIR)/$$p/; \
	    fi; \
	done

	$(INSTALL_DATA_DIR) $(DIST_DIR)/examples
	list='demo.tcl embed_firefox.tcl playback.tcl'; \
	for p in $$list; do \
	    $(DIST_INSTALL_SCRIPT) $(srcdir)/examples/$$p $(DIST_DIR)/examples/; \
	done
	list='erxvt.broken script'; \
	for p in $$list; do \
	    $(DIST_INSTALL_DATA) $(srcdir)/examples/$$p $(DIST_DIR)/examples/; \
	done

	$(INSTALL_DATA_DIR) $(DIST_DIR)/old
	list='build.SunOS.conf build.conf build.conf.ubuntu build.conf8.5 build.tcl pkgIndex.tcl tickmakefile'; \
	for p in $$list; do \
	    $(DIST_INSTALL_SCRIPT) $(srcdir)/old/$$p $(DIST_DIR)/old/; \
	done

Changes to examples/demo.tcl.

1
2
3
4
5
6
7
8
9
package require Tk
lappend ::auto_path .
package require TkXext

proc loop.resize {id i} {
 if {$i > 500} {
  return
 }
 
|
|







1
2
3
4
5
6
7
8
9
#! /usr/bin/env tclsh

package require TkXext

proc loop.resize {id i} {
 if {$i > 500} {
  return
 }
 

Changes to examples/embed_firefox.tcl.


1

2
3
4
5
6
7
8

load ./TkXext.so 


pack [frame .controls]
pack [button .controls.b -text "I'm from Tk"] -side left
pack [frame .f -width 200 -height 200 -container 1] -fill both -expand 1
exec firefox http://www.google.com &
set moz [TkXext.find.window Google*];
if {0 eq $moz} {
>
|
>







1
2
3
4
5
6
7
8
9
10
#! /usr/bin/env tclsh

package require TkXext

pack [frame .controls]
pack [button .controls.b -text "I'm from Tk"] -side left
pack [frame .f -width 200 -height 200 -container 1] -fill both -expand 1
exec firefox http://www.google.com &
set moz [TkXext.find.window Google*];
if {0 eq $moz} {

examples/erxvt.broken became a regular file.

Changes to examples/playback.tcl.


1
2
3
4
5
6
7
8
9


lappend ::auto_path .
package require TkXext 

proc main {argc argv} {
 if {$argc != 1} {
  return -code error "please specify a file argument"
 }
 source [lindex $argv 0]
>

<







1
2

3
4
5
6
7
8
9
#! /usr/bin/env tclsh


package require TkXext 

proc main {argc argv} {
 if {$argc != 1} {
  return -code error "please specify a file argument"
 }
 source [lindex $argv 0]

Changes to examples/script.


1
2
3
4
5
6
7

after 3
TkXext.move.pointer 631 707
after 374
TkXext.move.pointer 632 707
after 11
TkXext.move.pointer 633 707
after 12
>







1
2
3
4
5
6
7
8
# Example playback script for TkXext.
after 3
TkXext.move.pointer 631 707
after 374
TkXext.move.pointer 632 707
after 11
TkXext.move.pointer 633 707
after 12