Re: Package unloading



Derek Fountain wrote:
Have you tried using "package forget"?

Yes. That seems to convince the interpreter that the package is no longer loaded, but doesn't actually delete the namespaces and procedure definitions that it created. auto_path still contains the paths to the files. All the procs in the package are still in the interpreter so they still run.

I was hoping there was some easy way to back out all that stuff, or to force the next "package require" command to go and reload the tcl file from the disk. Is there an easy way to re-source the file without having to type its full filename (which is this case is enormous)?

When I find my self in this development mode (which is rare), I typically create a "reload" command that does all the dirty work for me. Are you aware of tkcon's "Revert State" menu item?

My normal way of work is to create a way to launch console from within my app, rather than run my app from a console. That way, each time I run my app I'm assured of a fresh start, but an interactive console is just a keypress or mouse click away.

--
Bryan Oakley
http://www.tclscripting.com
.



Relevant Pages

  • Re: Linked packages in advertisement?
    ... To set a dependency chain: Create two programs program a and program b. ... You don't have to update the package to change program dependency. ... > If I later have to distribute a third App wich also depends on Oracle, ... You don't have to re-package Oracle client. ...
    (microsoft.public.sms.swdist)
  • Re: Good News Guys
    ... American knows how to package and ship something like a 360 such that it ... it in one of my old boxes from their repair center. ... Console Serial Number: ... If you were sent an electronic mailing label ...
    (alt.games.video.xbox)
  • Re: Distributed Access references
    ... understand from trying to package an app and working w/ ... Although it appears that the excel does get packaged by ... So my app relies on the user having their own ... As for the other references I am not sure what to do? ...
    (microsoft.public.access.devtoolkits)
  • Re: What am I missing without mutt?
    ... The function of acon is to display arabic text from right to left, ... Package: dynafont ... It switches console to UTF8 mode and loads required fonts ... Wikipedia doesn't show those letters. ...
    (Debian-User)
  • Re: Visual Basic executable file
    ... simply use the the Package & Deployment wizard to create a setup ... Have the user run the install package that is on the CD. ... properly install your app on their PC. ... Create an INI file with the database path and have your app ...
    (microsoft.public.vb.general.discussion)