cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
miguello
Level VI

How to delete Filter Col Selector display box?

I have a Filter Col Selector with filter text field (because of many columns in the data table):

 

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Bands Data.jmp" );
pb = Panel Box("Test", 
	fcl = Filter Col Selector( dt, all ) 
	
);
New Window( "Filter Col Selector Example",  pb );

 

I get the list of columns (red frame) and filter (green frame)

2022-08-29 12_38_51-Filter Col Selector Example - JMP.png

Let's say I now want to delete the whole thing. 

I say:

fcl<<Delete Box();

What I see is that only list of columns got deleted, leaving the filter behind:

2022-08-29 12_40_25-Filter Col Selector Example - JMP.png

 

So if I look at the properties of the window, I see the following:

The box that got deleted was actually the very last ListBoxBox. While FilterColSelector has other boxes, when you create it, returned reference is to that last box only.

2022-08-29 12_43_51-Filter Col Selector Example - JMP.png

 

Ok, let's try to say:

realFCL = (((fcl << Parent)<<Parent)<<Parent);
//DisplayBox[FilterColSelector]

I can see now that realFCL is our FilterColSElector.

Let's delete it:

realFCL <<Delete Box;

But we get exactly the same picture:

2022-08-29 12_40_25-Filter Col Selector Example - JMP.png

Looks like referring to grand-grand-parent of Filter Col Selector gets the same reference.

The only way to do it is to try to delete either realFCS or fcs TWICE.

realFCL = (((fcl << Parent)<<Parent)<<Parent);
realFCL <<Delete Box;
realFCL <<Delete Box;

Then it works.

 

Can someone explain to me why this is happening and what is the proper way of deleting Filter Col Box?

 

1 ACCEPTED SOLUTION

Accepted Solutions
ErraticAttack
Level VI

Re: How to delete Filter Col Selector display box?

Why is it happening?  One of life's great mysteries together with the weird inconsistency of JMP.

 

BKM for creating / deleting FCBs?  Slap that bad box inside of an Outline Box()

 

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Bands Data.jmp" );
pb = Panel Box("Test", 
	olb = Outline Box( "", fcl = Filter Col Selector( dt, all ) )
	
);
New Window( "Filter Col Selector Example",  pb );

Wait( 1 );
olb << Delete
Jordan

View solution in original post

7 REPLIES 7
ErraticAttack
Level VI

Re: How to delete Filter Col Selector display box?

Why is it happening?  One of life's great mysteries together with the weird inconsistency of JMP.

 

BKM for creating / deleting FCBs?  Slap that bad box inside of an Outline Box()

 

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Bands Data.jmp" );
pb = Panel Box("Test", 
	olb = Outline Box( "", fcl = Filter Col Selector( dt, all ) )
	
);
New Window( "Filter Col Selector Example",  pb );

Wait( 1 );
olb << Delete
Jordan
txnelson
Super User

Re: How to delete Filter Col Selector display box?

You can also close the complete window with:

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Bands Data.jmp" );
pb = Panel Box("Test", 
	fcl = Filter Col Selector( dt, all ) 
	
);
New Window( "Filter Col Selector Example",  pb );
wait(5); Window( "Filter Col Selector Example" ) << close window;
Jim
miguello
Level VI

Re: How to delete Filter Col Selector display box?

I actually need that window, Jim, it has many other things in it.

The reason I delete it is I close the table it is associated with and immediately open a new one, and I need to populate a new list with columns from the new table. I couldn't find the better way rather than delete old one and create a new one.

 

txnelson
Super User

Re: How to delete Filter Col Selector display box?

deleting an object and then recreating it works well.The way JMP handles the refresh, you typically do not see anything except the new object once it is displayed....i.e. no display of the window with the deleted object.

I have done this many, many times.

Jim
miguello
Level VI

Re: How to delete Filter Col Selector display box?

I mean, the whole window is an input window for a custom platform. It has other controls to load CSV file, cast columns into roles, plot various reports etc. I can't delete a whole window - looks like deleting outer box is the best option. But for now I just ended up with 

fcl<<Delete Box;
Try(fcl <<Delete Box);

The second Delete has to have Try since if there are few columns in the file, the filter is not displayed.

 

miguello
Level VI

Re: How to delete Filter Col Selector display box?

Yeah, I was thinking about the same route, just wanted to ask around first. Thanks for the suggestion though, looks like it indeed is the best know method so far

 

miguello
Level VI

Re: How to delete Filter Col Selector display box?

Okay,

 

My way turned out to be buggy, this is the way to do it - throw Filter Col Selector into an Outline box and then delete the whole thing. 

Then recreate it and append Filter Col Selector to it again whn you have a new table.