From: Kevin Walzer on 24 Mar 2010 09:32 I'm working on a binary extension for Tk and, as part of this project, must initialize a path to an image file at the C level. (For various reasons, I can't do this at the Tcl level when I load the library.) I'm storing the image file in the same directory as the compiled library. Because the package may be installed in numerous places, I can't simply hard-code the path. In Tcl's C API, what's the equivalent of [file join [file dirname [info script]] foo.png] ? Advice appreciated. --Kevin -- Kevin Walzer Code by Kevin http://www.codebykevin.com
From: Don Porter on 24 Mar 2010 09:45 Kevin Walzer wrote: > In Tcl's C API, what's the equivalent of [file join [file dirname [info > script]] foo.png] ? Advice appreciated. Tcl_Eval(interp, "file join [file dirname [info script]] foo.png"); -- | Don Porter Mathematical and Computational Sciences Division | | donald.porter(a)nist.gov Information Technology Laboratory | | http://math.nist.gov/~DPorter/ NIST | |______________________________________________________________________|
|
Pages: 1 Prev: Mouse over Next: Ttk widgets: changing the background colour? |