stk/Demos/filebox.stklos

32 lines
1.1 KiB
Plaintext
Raw Normal View History

1998-04-10 06:59:06 -04:00
#!/bin/sh
:;exec /usr/local/bin/stk -f "$0" "$@"
;;;;
1996-09-27 06:29:02 -04:00
;;;; f i l e b o x . s t k l o s -- A demo of the <FileBox> class
;;;;
1999-02-02 06:13:40 -05:00
;;;; Copyright <20> 1993-1999 Erick Gallesio - I3S-CNRS/ESSI <eg@unice.fr>
1996-09-27 06:29:02 -04:00
;;;;
1999-09-05 07:16:41 -04:00
;;;; Permission to use, copy, modify, distribute,and license this
;;;; software and its documentation for any purpose is hereby granted,
;;;; provided that existing copyright notices are retained in all
;;;; copies and that this notice is included verbatim in any
;;;; distributions. No written agreement, license, or royalty fee is
;;;; required for any of the authorized uses.
;;;; This software is provided ``AS IS'' without express or implied
;;;; warranty.
1998-04-10 06:59:06 -04:00
;;;;
1996-09-27 06:29:02 -04:00
;;;; Author: Erick Gallesio [eg@kaolin.unice.fr]
;;;; Creation date: 12-Jun-1994 11:24
1999-09-05 07:16:41 -04:00
;;;; Last file update: 3-Sep-1999 18:57 (eg)
1996-09-27 06:29:02 -04:00
(require "Tk-classes")
1998-04-10 06:59:06 -04:00
;; Just create a filebox and return the selected value
1999-02-02 06:13:40 -05:00
(let ((result (Tk:get-open-file)))
1996-09-27 06:29:02 -04:00
(apply format #t (if result
(list "You have selected the file ~S\n" result)
(list "CANCEL. No file selected\n")))
1998-04-10 06:59:06 -04:00
(exit 0))
1996-09-27 06:29:02 -04:00