View Full Version : calling a proc from in a flag

10 October 2006, 05:20 PM
I was wondering if any one might know what I am doing wrong here or if this is even possible. I am trying to call the testFilePath proc in the -image flag for picture. It runs but does not put the return string into the -image flag.

proc string testFilePath( string $name ) {
string $xtest = ("C:/testdirectory/"+$name);
return $xtest;
print ($xtest+"\n");
window testwin;
string $testpic = `picture -image testFilePath("test.bmp")`;
showWindow testwin;

I know I can stick the result from testFilePath into its own var then just call it at the -image flag, but I would rather not. The interface I am building is very art intensive and it would be a pain to declare each piece of art.

Thanks in advance,

10 October 2006, 11:00 PM
I got it. I needed to wrap the whole proc up in parentheses (testFilePath("test.bmp")) and it worked. I thought I tried that before posting but I guess I didn't.

CGTalk Moderation
10 October 2006, 11:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.