Hi all,
I am writing a UI and I include a section for the user to select output directory to save the generated data files. Following is the script:
// press the select button
selectDirectoryButtonPress = Function( {this},
outputLocation = Pick Directory( "Select output location." );
outputDir << setText( outputLocation );
);
// press the clear button
ClearDirectoryButtonPress = Function( {this},
outputDir << setText( "" );
);
However, the button sometimes works fine but sometimes raise a bug saying
Send Expects Scriptable Object{30} in access or evaluation of 'Send' , outputDir << /*###*/setText( outputLocation ) /*###*/.

Especially after the user has already select a directory path, pressing either button will have the send bug. I don't understand why this happen... I also have a section that ask the user to provide input file and that works fine every time.
Glad you got the answer. The message Send Expects Scriptable Object means the << (send operator) is trying to send a message (like settext) to outputDir, but outputDir is not holding an object that accepts messages (a Scriptable Object). JSL has a show function that can be helpful for these problems; show(outputDir) just before the send will tell you what outputDir is holding.
I'll pass this on to someone that might be able to make the message more clear; it happens a lot.