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

Hidden namespaces

I would love it if there was a possibility for hidden namespaces

Where

 

Names default to here(1);
new namespace("_Test");
get namespace names()

wouldn't show the "_Test" namespace.  

8 Comments
gzmorgan0
Super User (Alumni)

@vince_faller , I have JMP PRO 14.3 on windows and here is a screen shot that get namespace names() does return the names. Below is a script that demonstates that show namespaces()  with log capture is another alternative.

 

image.png

Names default to here(1);
new namespace("_Test");
new namespace("_Test2");
new namespace("_Test3");

_xx= Words(Trim(Log Capture(show namespaces())), "\!N");
show(_xx);

get namespace names();

Namespace("_Test3") << delete namespace;
get namespace names();

Namespace("_Test2") << delete namespace;
get namespace names();

Namespace("_Test") << delete namespace;
get namespace names();
vince_faller
Super User (Alumni)

I want it NOT to show those names.  

gzmorgan0
Super User (Alumni)

Sorry, I misread your request. I agree your suggestion could be useful.

Just a suggestion,  might want to specify a preferred usage; something like:

  •  New Namespace("_Test", Private|Invisible); , or
  • New Namespace("_Test", Password ( "xyz" ) );

I'd prefer the first bullet usage.

 

 

vince_faller
Super User (Alumni)

Sorry, made the assumption that it would work the same way as hidden variables _Test.  Private would work too.  

Jeff_Perkinson
Community Manager

Can you explain the use case here a bit? What are the advantages of a hidden namespace?

vince_faller
Super User (Alumni)

My first thought is for using namespaces in customer code that we don't want them to have access to.  I can encrypt it but if there are flags in place the variable names and values show up.  From what it seems I can't even make the variables in a namespace hidden.  

 

Names default to here(1);
__x = 5;
show symbols();

new namespace("__Test", 
	{
		a = 1,
		__hidden = 2,
		__hidden_function = function({}, 
			print("hidden")
		)
	}
);
get namespaces();

I'm just trying to protect proprietary code a little better. 

 

My big use case for JMP 14 is that I'm absolutely loving New Custom Function().  But to use that, it requires the use of a namespace.  

Ryan_Gilmore
Community Manager
Status changed to: Archived
We are archiving this request. If this is still important please comment with additional details and we will reopen. Thank you!
hogi
Level XII

hidden namespaces -> still interesting.