Choose Language Hide Translation Bar
Highlighted
KurtK
Level II

Possible bug in Set Selected() ?

The following code is directly out of the JMP Scripting Guide, with the exception of the Names Default To Here() line:

Names Default To Here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
cc = dt << Get Column Names( "Continuous" );
ncols = N Items( cc );
For( i = 1, i <= ncols, i++,
	cc[i] << Set Selected( 1 )
);

If I run this in JMP 13, I get the following error message:

 

Send Expects Scriptable Object in access or evaluation of 'Send' , cc[i] <<  /*###*/Set Selected( 1 ) /*###*/

If I then comment out the Names Default To Here line, the script still fails with the same message. The only way to clear the error is to close the script file and reopen it.

What am I missing here? How do I fix this?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
txnelson
Super User

Re: Possible bug in Set Selected() ?

I have replicated your error in JMP 13, however, it does not error in JMP 15.  Below is a work around for JMP 13

Names Default To Here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
cc = dt << Get Column Names( "Continuous" );
ncols = N Items( cc );
For( i = 1, i <= ncols, i++,
	column(char(cc[i])) << Set Selected( 1 )
);
Jim

View solution in original post

3 REPLIES 3
Highlighted
txnelson
Super User

Re: Possible bug in Set Selected() ?

I have replicated your error in JMP 13, however, it does not error in JMP 15.  Below is a work around for JMP 13

Names Default To Here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
cc = dt << Get Column Names( "Continuous" );
ncols = N Items( cc );
For( i = 1, i <= ncols, i++,
	column(char(cc[i])) << Set Selected( 1 )
);
Jim

View solution in original post

Highlighted
gzmorgan0
Super User

Re: Possible bug in Set Selected() ?

@KurtK ,

 

Jim, @txnelson, provided you an excellent solution.

 

This is just an FYI:  As Column() will also work.


	As Column(cc[i]) << Set Selected( 1 )

 

Highlighted
KurtK
Level II

Re: Possible bug in Set Selected() ?

Thanks!
Kurt
Article Labels