BookmarkSubscribeSubscribe to RSS Feed
miguello

Community Trekker

Joined:

Jan 27, 2016

User gets errors with my script that I cannot reproduce.

I finished my App and it works as intended on my macihne. I sent it to few users to test the App. Users gets error messages where they shouldn't.

Part of the script you need to choose a column from the Col List.

I created this Col List Box earlier in the script and assigned some onChange script that pretty much reads what column is selected:

colListX = Col List Box (Data Table(dt<<Get Name), all, width(250), maxSelected(1), On Change(colListXselected = colListX<< Get Selected; show(colListXselected); show(IsScriptable(colListXselected)); colXtext = colListXselected[1]<< Get Name; colX = Column(dt, colXtext); someotherfunctions()));

Now, when users click any column in the Col List Box, they get the below error message. I have put some show() commands in the code and asked them to run it:

error_screenshot.png

So, here colListX - is the Col List Box I'm working with. colListXselected - is the column currently selected wihch I get by Get Selected. Interesting: users have it shown in log as 

colListXselected = {"eventtime"};
Is Scriptable(colListXselected) = 1;

wihle my log shows it as 

colListXselected = {:eventtime};
Is Scriptable(colListXselected) = 1;

and the code running is identical.

 

I guess the whole error happens because users don't have it as a column, so even though the object IS scriptable, Get Name message can't be applied to it since it is not column?

Anyways, any idea why users have this difference from my output? How to troubleshoot it?

 

Thanks, 

M

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Wendy_Murphrey

Joined:

Jun 23, 2011

Solution

Re: User gets errors with my script that I cannot reproduce.

This was a problem in JMP 13.0.0.  Please see JMP Problem Note 59737 for details.  You can download the free update to JMP 13.2.1 from the JMP Software Updates page.

 

Hope that helps!

Wendy
4 REPLIES
gzmorgan0

Community Trekker

Joined:

Jul 25, 2016

Re: User gets errors with my script that I cannot reproduce.

Miguello,

  ColListBox << get selected returns a list of column names, that is, a list of quoted strings. I have no clue how your result is a column reference.  Regarding the error: look at the script below. Both lists usrsel1 and usrsel2 are lists and scriptable.  usrsel1[1] is scriptable because it is a column reference: it has messages (methods). usrsel2[1] is a string it is not scriptable. That is what your reported error message is telling you.

 

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
usrsel1 = { :height  };
usrsel2 = { "height" };

//Run one line at a time

Show( IsScriptable(usrsel1), IsScriptable(usrsel2) ); // both are 1

Show( IsScriptable(usrsel1[1]), IsScriptable(usrsel2[1]) ); //results are 1, 0

show(usrsel1[1] <<get name); //result "height"

show(usersel2[1] << get name); //error

I know of no preference, or option to set (on Windows) where get selected returns column references.

 

Craige_Hales

Staff

Joined:

Mar 21, 2013

Re: User gets errors with my script that I cannot reproduce.

You can use the JMPVersion() function to print the version of JMP.

Craige
miguello

Community Trekker

Joined:

Jan 27, 2016

Re: User gets errors with my script that I cannot reproduce.

Just got time to get back to this.

 

Thanks a lot for the troubleshooting - it makes sense now as in I know why my users get this error.

What I don't understand is why my JMP returns list of column references, while it is supposed (and it does with other users) return list of strings.

To exclude the rest of the code and make sure it doesn't have any effect on it, I wrote this small script and asked my users to run it:

Names Default To Here( 1 );
Clear Log();
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
New Window( "Col List Box Example",
	colList = Col List Box( all, width( 250 ), maxSelected( 1 ) ),
	
);
colList << Set Selected (2);
colListSelected = colList<< Get Selected;
testString="test";
show(Type(testString));
show(Type(colListSelected));
show(Type(colListSelected[1]));
show(colListSelected[1]);

My JMP returns this:

Type(testString) = "String";
Type(colListSelected) = "List";
Type(colListSelected[1]) = "Name";
colListSelected[1] = :age;

Their JMP returns this:

Type(testString) = "String";
Type(colListSelected) = "List";
Type(colListSelected[1]) = "String";
colListSelected[1] = "age";

How is this possible? Anybody from JMP can take a look at this? Or should I send it to support?

 

Thanks, 

M

Highlighted
Wendy_Murphrey

Joined:

Jun 23, 2011

Solution

Re: User gets errors with my script that I cannot reproduce.

This was a problem in JMP 13.0.0.  Please see JMP Problem Note 59737 for details.  You can download the free update to JMP 13.2.1 from the JMP Software Updates page.

 

Hope that helps!

Wendy