Share your ideas for the JMP Scripting Unsession at Discovery Summit by September 17th. We hope to see you there!
Choose Language Hide Translation Bar
0 Kudos

Hidden namespaces

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



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

wouldn't show the "_Test" namespace.  

Tracking Number:

Defect ID:

Super User

@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.



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

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

get namespace names();

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

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

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

I want it NOT to show those names.  

Super User

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.



Super User

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

Community Manager

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

Super User

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({}, 
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.