Bug in JMP 13.1 for Table Box Row Change FunctionHello JMP users,
I've encountered a bug with the row change function for a table box. I'm trying to change the focus to a different tab inside the function but it gets ignored. I contacted JMP tech support who said it would either be fixed in JMP 13.2 or 14. This is a show stopper for me. I was wondering if anyone else noticed this behavior and was able to come up with a workaround?
Thanks,
Peter
Here's the program that demonstrates the bug:
nw = new window("test",
tabx = tab box(
"First Tab",
tb = table box(
scb1 = string col box("One", {"AAA", "BBB", "CCC"}),
scb2 = string col box("Two", {"XXX", "YYY", "ZZZ"}),
scb3 = string col box("Three", {"Giant", "Awesome", "Stupendous"}),
ncb = number col box("Four", {44, 33, 22}),
),
"Second Tab",
txb = text box("Nothing selected"),
),
);
tb << Set Selectable Rows(1);
tb << set row change function(
function({this},
rlist = this << get selected rows;
if (nrows(rlist) > 0,
print(rlist[1]);
txb << set text(char(rlist[1]));
tabx << set selected(2);
);
);
);Re: Bug in JMP 13.1 for Table Box Row Change FunctionThanks Dan. It's a rube goldberg-ish kind of solution but it works!
Re: Bug in JMP 13.1 for Table Box Row Change FunctionHi Peter,
This issue was caused by the addition of focus for Tab Page Box in JMP 13. When you click in a Tab Page, it wants to take focus if it does not already have focus. The timing is breaking things in this case, because the row change callback sets focus to the second tab page, and then the tab that you clicked in immediately steals it back.
To work around the problem, we need a way to set the tab after the click processing has completed. Here's an example where I set a variable for the tab page that I want to switch to, and then in a Frame Box graphics script the tab page is reset. This happens on the next draw, which will happen immediately after the click has completed.
I hope that helps!
-Dan
tabOverride = 0;
nw = New Window( "test",
V List Box(
tabx = Tab Box(
"First Tab",
tb = Table Box(
scb1 = String Col Box( "One", {"AAA", "BBB", "CCC"} ),
scb2 = String Col Box( "Two", {"XXX", "YYY", "ZZZ"} ),
scb3 = String Col Box( "Three", {"Giant", "Awesome", "Stupendous"} ),
ncb = Number Col Box( "Four", {44, 33, 22} ),
),
"Second Tab",
txb = Text Box( "Nothing selected" ),
),
gb = Graph Box( Frame Size( 1, 1 ), XName( "" ), YName( "" ) )
)
);
Try(gb[AxisBox( 1 )] << Delete Box);
Try(gb[AxisBox( 1 )] << Delete Box);
Try(gb[Text Edit Box( 1 )] << Delete Box);
Try(gb[Border Box(1)] << Top(0) << Bottom(0) << Left(0) << Right(0));
gb[FrameBox( 1 )] << Add Graphics Script(
If( tabOverride > 0,
tabx << Set Selected( tabOverride );
tabOverride = 0;
)
);
tb << Set Selectable Rows( 1 );
tb << set row change function(
Function( {this},
rlist = this << get selected rows;
If( N Rows( rlist ) > 0,
Print( rlist[1] );
txb << set text( Char( rlist[1] ) );
tabOverride = 2;
tabx << set selected( 2 );
);
)
);
Re: Bug in JMP 13.1 for Table Box Row Change FunctionPete,
I have run into similar issues with the Tabs. Several times I have solved the issues by deleting the specific insert, and then rebuilding it with the new information. Visually, it has no affect as far as the user is concerned, so when this works, it is a good work around. However, I made an attempt to do the same with your sample script, and I was not able to overcome your "selection" issue.