cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Choose Language Hide Translation Bar
vistacc
Level III

Why this bug happens occasionally? (Send Expects Scriptable Object)

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 ) /*###*/.

test.png

 

 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. 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Craige_Hales
Super User

Re: Why this bug happens occasionally? (Send Expects Scriptable Object)

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.

Craige

View solution in original post

4 REPLIES 4
vistacc
Level III

Re: Why this bug happens occasionally? (Send Expects Scriptable Object)

Any help would be greatly appreciated!
vistacc
Level III

Re: Why this bug happens occasionally? (Send Expects Scriptable Object)

Never mind! I have figured out the problem is that I give the two variables(the text box as "outputDir" and the variable that save the content in the text box as "outputdir") the same name (only case different). I forgot JMP is not case sensitive. I don't know how to delete the post. If any admin see this post, please delete it. Thank you!
Craige_Hales
Super User

Re: Why this bug happens occasionally? (Send Expects Scriptable Object)

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.

Craige
vistacc
Level III

Re: Why this bug happens occasionally? (Send Expects Scriptable Object)

Thank you for your advice! Using show() to check is a good idea!