cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
0 Kudos

<<Get Namespace for special namespaces

I think it would be great if I could access the variables set to special namespaces (like box, window, etc).  See the following script, 

 

Names Default To Here( 1 );
testbox = Function( {items, win_index = 1, box_index = 1},
	{default local},
	ctb = Context Box(
		box:win_index = win_index;
		box:box_index = box_index;
		box:hlb = H List Box(
			box:btn_close = Button Box( "Close Me", box:hlb << delete ),
			box:btn_get = Button Box( "Get Selected", Print( box:lb_items << get Selected ) ),
			box:btn_find = Button Box( "Find Me", Print( box:win_index, box:box_index ) ),
			box:btn_select = Button Box( "Select
Me", box:hlb << Select ),
			box:btn_deselect = Button Box( "DeSelect Me", box:hlb << DeSelect ),
			box:lb_items = List Box( items )
		);
	);
	Return( ctb );
);


nw = new window("Test Window", 
	window:win_index = 14;
	window:box_index = 28;
	cont_box = testbox( {"1", "2", "3"}, 3, 4 ), 
	textbox("Some stuff")
);

 

if I could access nw:win_index and cont_box:win_index and have the values come out correctly, that would be fantastic. Currently it can only access the namespace from inside the EvalContextBox. 

5 Comments
Audrey_Shull
Staff

I'm pleased to share that this issue has been addressed in JMP 15, which is currently under development and will be available in the fall. References can now be used to access variables scoped within the objects they reference. This includes windows, context boxes, JMP applications, and JMP application module instances. For example, if you have a window reference w, w:var and Namespace(w) now work.

Jeff_Perkinson
Community Manager
Status changed to: Yes, Stay Tuned!
 
vince_faller
Super User (Alumni)

That is beautiful to hear. 

gzmorgan0
Super User (Alumni)

Ditto @vince_faller's response.

Jeff_Perkinson
Community Manager
Status changed to: Delivered

This is now available in JMP 15.