Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grabbing a file name

Status
Not open for further replies.

WaltS

Programmer
Mar 11, 2002
13
US
I an using an [itcl] fileselectionbox so that I can run a command on it. My question is how do I grab the name of the file to pass it along to my command

proc checkInFile { } {
global cs env userID
dialog .checkin -modality application -title {check In Files}

set cs [frame [.checkin childsite].f]
fileselectionbox $cs.fsd1 -directory /home/$userID/Working/
grid $cs.fsd1
grid $cs

.checkin buttonconfigure Help -text "Check New" -command ???I_have_no_clue???
.checkin activate
}
 
According to the fileselectionbox documentation, its get operation returns the file currently selected (that is, currently displayed in the entryfield). Most likely, you'll need to create another procedure that retrieves the fileselectionbox contents and processes it, then register that procedure as the -command callback.

As another suggestion, have you considered using the [ignore][incr Widgets][/ignore] fileselectiondialog instead of assembling your own? - Ken Jones, President
Avia Training and Consulting
866-TCL-HELP (866-825-4357) US Toll free
415-643-8692 Voice
415-643-8697 Fax
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top