cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
  • See how to move from signal modeling to system modeling at the first JMP Aerospace Analytics webinar. Register. June 18, 1 p.m. US Eastern Time.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
David_Burnham
Super User (Alumni)

Unexpected Events from Local Data Filter Change Handler

Below is some illustrative code that displays a graph with a local data filter.

 

namesDefaultToHere(1);

dt = open("$SAMPLE_DATA/Big Class.jmp");

graphContent = VListBox(
	dt << Bivariate( 
		Y(:weight), 
		X(:height) 
	)	
);

NewWindow("Test",
	Data Filter Context Box(
		BorderBox(top(20),bottom(20),left(20),right(20),
			HListBox(
			
				// local data filter
				::df = dt << Data Filter( local,
					AddFilter(
						columns(:sex),
						display(:sex,"List Display")
					)
				),

				// some content
				graphContent	
							
			)
		)
	)
);

// define event handler for data filter

::rs = ::df << makeFilterChangeHandler(
	function({x},
		show("data filter event handler");	
		show(hptime());	
	)
);

 

Making selections to the data filter triggers the event handler, as expected.

 

However, the event handler also gets triggered just by hovering over data points in the graph.  Does anyone have any thoughts on why that would happen?

-Dave
1 ACCEPTED SOLUTION

Accepted Solutions

Re: Unexpected Events from Local Data Filter Change Handler

One way that you can distinguish these messages is by testing for x==(-1).  This message should probably be omitted for the df<<makeFilterChangeHandler().  It has more meaning for box<<makeRowStateHandler(), which has to handle the case when filters are added or removed.

View solution in original post

1 REPLY 1

Re: Unexpected Events from Local Data Filter Change Handler

One way that you can distinguish these messages is by testing for x==(-1).  This message should probably be omitted for the df<<makeFilterChangeHandler().  It has more meaning for box<<makeRowStateHandler(), which has to handle the case when filters are added or removed.

Recommended Articles