JDA
10-24-2006, 07:47 AM
I'm trying to pass a var into a proc via a layoutDialog. In small controlled tests I can get it to work but in my script I'm getting odd results that I do not understand. Below are two very simplified examples. The first example has me the most confused. The variable in question prints out fine just before the layoutDialog call, but then says it is undeclared in the very next line.
string $var = "I'm Here!!!";
about 5 Deep of "if" and else
print ($var+"\n");
$choice = `layoutDialog -ui "questionPrmpt $var"`;
Result...
I'm Here!!!
questionPrmpt $var;
// Error: questionPrmpt $var; //
// Error: Line 1.21: $var" is an undeclared variable. //
The second example below, the variable gets passed along to questionPrmpt just fine. But calling questionPrompt in this way seems to cause it to louse who its parent is and the parent is needed for the formLayout. So I am guessing this one is a dead-end, but the point is that the variable was passed along.
string $var = "I'm Here!!!";
about 5 Deep of "if" and else
print ($var+"\n");
$choice = `layoutDialog -ui (questionPrmpt ($var))`;
Result...
I'm Here!!!
Object not found: NONE
Also FYI I need more functionality than confirmDialog will give me.
Thanks in advance,
JDA
string $var = "I'm Here!!!";
about 5 Deep of "if" and else
print ($var+"\n");
$choice = `layoutDialog -ui "questionPrmpt $var"`;
Result...
I'm Here!!!
questionPrmpt $var;
// Error: questionPrmpt $var; //
// Error: Line 1.21: $var" is an undeclared variable. //
The second example below, the variable gets passed along to questionPrmpt just fine. But calling questionPrompt in this way seems to cause it to louse who its parent is and the parent is needed for the formLayout. So I am guessing this one is a dead-end, but the point is that the variable was passed along.
string $var = "I'm Here!!!";
about 5 Deep of "if" and else
print ($var+"\n");
$choice = `layoutDialog -ui (questionPrmpt ($var))`;
Result...
I'm Here!!!
Object not found: NONE
Also FYI I need more functionality than confirmDialog will give me.
Thanks in advance,
JDA
