PDA

View Full Version : Stupid question.. sorry


avsfilms
10-18-2007, 10:55 PM
Hey there, I am fairly new to this software and was wondering if someone could help me out.

Basically I want the user to click on a button that will take them to a "File Browse" window so that they can select the file to delete.

First of all, can i change the button so it doesn't say "Open"? Can I change it to "Select" or "Select Event"?

If not, it doesn't matter. But anyway, I have the program run the following code:

evntloc = Dialog.FileBrowse(true, "Select Event to Delete", "C://Program Files//AVS Project Planner//prog//", "Event Files (*.txt*)|*.txt*|", "", "txt", false, true);

Input.SetText("Input2", evntloc);

But upon running the program, I get a "On Click, Line 3: attempt to concatenate global `eventloc' (a table value)"

How can I get it to not give me that error and place the path they selected into a blank input object?

Thank you for your time, I appreciate it!

mindstitchdr
10-18-2007, 11:09 PM
Change:

Input.SetText("Input2", ""..evntloc.."");

To:
Input.SetText("Input2", evntloc);

Not really sure what is going on but between me selecting post reply and actually replying the code changed.

avsfilms
10-18-2007, 11:16 PM
Haha I edited the code on my post like a minute after I posted it so that's probably why.

But even after I changed the code, I get the error that's shown below.

mindstitchdr
10-18-2007, 11:26 PM
Sorry I just noticed you are using a Dialog.FileBrowse which returns a table.

Try:

Input.SetText("Input2", evntloc[1]);

avsfilms
10-19-2007, 12:01 AM
Awesome! Thank you so much!