Changeset 22079 in project


Ignore:
Timestamp:
12/19/10 16:53:38 (9 years ago)
Author:
petercrlane
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/pstk

    r22078 r22079  
    22
    33PS/Tk provides an interface to the Tk toolkit, and is an effective tool for creating graphical interfaces. 
     4A detailed guide to using Tk from Scheme is in the separate [[http://homepages.stca.herts.ac.uk/~comqpcl/pstk.html|documentation]].
    45
    56[[toc:]]
     
    89
    910Several examples can be found in the [[http://anonymous@code.call-cc.org/svn/chicken-eggs/release/4/pstk/examples/|svn repository]] for this egg.
     11
     12==== Hello World
     13
     14<enscript highlight=scheme>
     15(require-extension pstk)
     16
     17(tk-start)
     18
     19(tk/pack
     20  (tk 'create-widget 'button 'text: "Hello"
     21      'command: (lambda () (display "Hello world") (newline)))
     22  'padx: 20 'pady: 20)
     23(tk-event-loop)
     24</enscript>
    1025
    1126==== Simple Dialog
     
    4661=== Tips on Using PS/Tk
    4762
    48 By default, the program {{tclsh8.5}} is called, but an alternative program may be provided as an optional argument to {{(tk-start)}}.  This feature is useful if you want to include [[http://code.google.com/p/tclkit/|tclkit]] in your application, so users don't need to install tcl/tk separately.  For example, to instead use {{tclkit-linux-x86}} begin the program with {{(tk-start "tclkit-linux-x86")}}.
     63* By default, the program {{tclsh8.5}} is called, but an alternative program may be provided as an optional argument to {{(tk-start)}}.  For a distributable application, you can bundle [[http://code.google.com/p/tclkit/|tclkit]] with your application, and call the tclkit application in {{tk-start}}.
    4964
    50 Under windows, there is a problem with keyboard input.  Currently, the fix is to show a dialog box which is dismissed by pressing 'Enter' (not clicking!) directly after starting tk. 
     65* Under windows, there is a problem with keyboard input.  Currently, the fix is to show a dialog box which is dismissed by pressing 'Enter' (not clicking!) directly after starting tk. 
    5166
    5267 (tk-start "wish85")
     
    5570 etc
    5671
    57 It is helpful to put an exception handler around your tk code to prevent orphaned shells, especially when developing your program. e.g.
     72* It is helpful to put an exception handler around your tk code to prevent orphaned shells, especially when developing your program. e.g.
    5873<enscript>
    5974(handle-exceptions
     
    6580 )
    6681</enscript>
    67 
    6882
    6983=== Authors
     
    7892=== Requirements
    7993
    80 Requires an installation of [[http://www.tcl.tk/software/tcltk/|tcltk]]
     94Requires an installation of [[http://www.tcl.tk/software/tcltk/|tcltk]] or [[http://code.google.com/p/tclkit/|tclkit]].
    8195
    8296=== Version History
Note: See TracChangeset for help on using the changeset viewer.