Share your ideas for the JMP Scripting Unsession at Discovery Summit by September 17th. We hope to see you there!
Choose Language Hide Translation Bar
Highlighted
WendyLou315
Level III

Text Box Error Message difficult to decipher from debugger

I am not looking for an answer here.  Just sharing my findings.

 

I have been attempting to debug a script and have run into the following error that will not allow the debugger to go past a starting notification window I programmed for user info:

(The following message might not be an actual error; the preference 'Report Invalid Display Box Messages' is ON.) Object 'TextBox' does not recognize the message ''.

 

Once the debugger hits this code, it hangs.  But running the script goes past this error, fully running the script.  I have an issue further into the script and this prevented me from finding a solution for quite some time.

 

Ultimately, I discovered that I simply put too many commas in the text box command, but the error did not lead me easily to this mistake.  I also verified that my preferences for Report Valid Display Box Messages is deselected.  Reaching out to other experienced JMP users lead me to this Discussions Board.  I have attached an non-specific version of the offending portion of my script in demonstration.

 

Discontinue = 1; 
	
/*
// This one was the problem window that gives the error:
//(The following message might not be an actual error; the preference 'Report Invalid Display Box Messages' is ON.) Object 'TextBox' does not recognize the message ''.
New Window( "Where is your file?", << Modal,
	H Center Box( Text Box( "Looooooooooooooooong Note 1", << Set Font( "Arial Black", 10, "Bold"), << Set Width( 200) ) ),
	Spacer Box( Size( 20, 15 ) ),
	H Center Box( Text Box( "Looooooooooooooooooooong Note 2", << Set Font( "Arial Black", 10, "Bold"), , << Set Width( 200) ) ),
	Spacer Box( Size( 10, 15 ) ),
	H Center Box( Text Box( "Continue?", << Set Font( "Arial Black", "Bold" ) ) ), 
	Spacer Box( Size( 10, 5 ) ),
	H Center Box(
		H List Box(
			Button Box( "Yes" ), 
			Button Box( "No", Discontinue = 0 ) 
		) 
	)
);
*/

//This is the fixed window
New Window( "Where is your file?", << Modal,
	H Center Box( Text Box( "Looooooooooooooooong Note 1", << Set Font( "Arial Black", 10, "Bold"), << Set Width( 200 ) ) ),
	Spacer Box( Size( 20, 15 ) ),
	H Center Box( Text Box( "Looooooooooooooooooooong Note 2", << Set Font( "Arial Black", 10, "Bold"), << Set Width( 200 ) ) ),
	Spacer Box( Size( 10, 15 ) ),
	H Center Box( Text Box( "Continue?", << Set Font( "Arial Black", "Bold" ) ) ), 
	Spacer Box( Size( 10, 5 ) ),
	H Center Box(
		H List Box(
			Button Box( "Yes" ), 
			Button Box( "No", Discontinue = 0 ) 
		) 
	)
);

print( "Testing...");

 

Hoping this helps others who make these simple mistakes that then cause us to spin our wheels for far longer than we should.  Too often there truly is a simple solution once we get out of our own way.

1 REPLY 1
Highlighted
Byron_JMP
Staff

Re: Text Box Error Message difficult to decipher from debugger

Its a minor thing, but sometimes this one thing makes finding that one comma, paren, or semi colon just a little easier.

In the script window, a right click pops up a menu with an option to "reformat script".  It will give you an error and a location when the script isn't working.  It also adds tabs, spacing and all that to make the scrip a little more readable. Also, really wonky looking formatting is a great way to detect unintended punctuation too.  

 

 

JMP Systems Engineer, Pharm and BioPharm Sciences
Article Labels

    There are no labels assigned to this post.