home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!sun-barr!ames!agate!sprite.Berkeley.EDU!ouster
- From: ouster@sprite.Berkeley.EDU (John Ousterhout)
- Newsgroups: comp.lang.tcl
- Subject: Re: Exiting tk Apps
- Date: 12 Dec 1992 00:18:49 GMT
- Organization: U.C. Berkeley Sprite Project
- Lines: 30
- Distribution: world
- Message-ID: <1gbb59INNlr3@agate.berkeley.edu>
- References: <1992Dec10.151958.5766@texhrc.uucp>
- NNTP-Posting-Host: tyranny.berkeley.edu
-
- In article <1992Dec10.151958.5766@texhrc.uucp>, schendr@texhrc.uucp (Dan R. Schenck) writes:
- |> When exiting a tk application with the tcl exit command, the application is
- |> destroyed except a notion of it still hangs around as evidenced by doing a
- |> winfo interps. Example:
- |>
- |> 1) application foo is exited with: exit 0
- |> 2) in wish I do a winfo interps and foo is still listed
- |> 3) if I try to send to foo I get this message:
- |> receiver never heard of interpreter "foo"
- |>
- |> The question is, can I exit an application with a specified return code and not
- |> have it appear that the application is still there when another app does a
- |> winfo? Now I have to send the app a message and catch any error just to see
- |> if it really exists. The only alternative is to exit all tk applications
- |> with "destroy .", which means I can't exit with a return code.
- |> --
- |> +--------------- Dan R. Schenck - Data Management - TEXACO EPTD ---------------+
- |> | External Email: schendr@Texaco.COM Texaco Email: schendr@texhrc |
- |> | _ __ Voice: (713) 954-6053 Fax: (713) 954-6911 |
- |> | /_) /-/ /\/ US Mail: Texaco, Inc., 3901 Briarpark, Houston, TX 77042 |
-
-
- You need to use "destroy ." to clean up all of the application's state, such
- as removing its interpreter registration. I haven't tried this, but I'll bet
- you can do
-
- destroy .
- exit $value
-
- to both clean up the window state and exit with a specific exit code.
-