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

Scripting Index improvements

I'd like it if examples in the scripting index could be named.  For instance open() has 5 examples and I always forget which one is the one for excel.  It'd be great if it worked for New Custom Function() << Example as well.  

And if we had a way to have custom classes be shown with their methods broken out.  

 

 

9 Comments

This is actually already available as the second argument to the Example message. However, it was not documented in time for the release of JMP 15. See example below.

myAdd = New Custom Function( "custom", "Add", Function( {x, y = 1}, x + y - 1 ) );
myAdd << Example( "Add(1, 2)", "Foo" );
myAdd << Example( "Add(1, 500)", "Bar" );
Add Custom Functions( {myAdd} );

2019-10-25_12-04-35.png

vince_faller
Super User (Alumni)

@Justin_Chilton repeatedly you're awesome. 

vince_faller
Super User (Alumni)

@Justin_Chilton , do you know if it's possible to extract the name after the fact? I'm trying to use so we can automatically use examples for hamcrest and was thinking of using this name as the label.  

No, it doesn't look like `Get Examples` includes the names of the examples. Also, the examples for Hamcrest include a re-definition of the global reporter, so I am not sure how useful it will be to run the examples.

vince_faller
Super User (Alumni)

I was more saying for our stuff, we want to take examples of custom functions and make hamcrest examples out of them.  

So if we have some markdown in the example it will create a hamcrest test for it.  

bobmorrane
Level V

Another improvement please :

 

  • Make text easily copied. Currently, if I want to copy the text explaining the function syntax and its explanation, I have to right click--> edit --> select  and then Ctrl+C or right click --> copy text. This way of doing things is quite old, the same the Windows command line! Could we have a one click solution? Like a button or just by making the text selectable directly with a left mouse click.
  • Make text easily pasted! After I copied text from the Scripting index, when I paste it in a text editor like word or Notepad, it contains a bunch of formatting code that looks like html or something. Can we have just plain text ?

 

 

 

 

Jeff_Perkinson
Community Manager
Status changed to: Yes, Stay Tuned!

The Open() examples will be named in JMP 16. For the other ideas in comments here, please open additional wishes so they can be tracked.

Jeff_Perkinson
Community Manager
Status changed to: Delivered

With the release of JMP 16 the examples mentioned in this wish have been named. 

2021-03-31_13-29-14.708.png

hogi
Level XII

hogi_0-1720039171523.png

wow, nice trick , @bobmorrane 


still useful in 2024 ...