Tcl help anyone?
So I'm writing this little program in Tcl to join files (you know, like binaries downloaded from newsgroups split into .001 .002 etc), as there is a lack of linux splitters/joiners that are any good. I have it working on the commandline and I'm trying to build a Tk interface (mostly for my own learning, but also because I might like to release it at some point). The problem I run into is with variables. When I run the joinFiles procedure by clicking the Join button, it tells me that the global variables don't exist, when clearly they do and I've defined them as global.
So, here's my code. Anyone see the problem? Code:
#!/usr/bin/tclsh |
______________________________________________________________________________
# Filename, number of parts, deletion option, skip option variable filename, parts, delete, skip; ______________________________________________________________________________ I guess that u missed out a global decleration here. |
Nope, that shouldn't be a global declaration, in Tcl global declarations go insice a procedure in order to adopt a variable defined in global scope.
Anyway, I figured out the problem thanks to someone on another board. Shouldn't have the commas between the variable names in the global declaration. It works perfectly now :D |
OK. Thanks for sharing that :)
|
NP, thought I should post the solution so that this thread can help others in the future.
|
All times are GMT -5. The time now is 02:56 AM. |