BookmarkSubscribe
Choose Language Hide Translation Bar
David_Burnham
Super User

Re: How to create an application using R functions

the V List Box function receives ones or more display boxes, each separated by commas.  So on the Check Box line replace the semicolon (;) with a comma (,).

-Dave

-Dave
0 Kudos
olivia_manning
Community Trekker

Re: How to create an application using R functions

Thanks Dave!

I've decided to go with List Box in the end as it corresponds better to what I need.

So I now have this:

Names = R Get(Tests);

nw = New Window("Test",<<Modal,

     V List Box(

          Check Box(Names, <<Get Selected),

          H List Box(

               Button Box("Ok", tname = Names << get text; cancel=-1;),

               Button Box("Cancel",cancel=1;)

               )

          )

     );

if(cancel !=-1, Stop(););

But for some reason, in my window I only have the first item of the list "Names" - any ideas of why that may be? I have checked Names and it does contain all of the thirty something items I have put into it so I really don't understand why this is happening...

0 Kudos
David_Burnham
Super User

Re: How to create an application using R functions

Are you sure that Names contains a list?

Try replacing the first line of code with Names={"test1","test2","test3"};

This will verify that the JSL part is working as you want, then you can look at what is coming back from the RGet function

-Dave
0 Kudos
olivia_manning
Community Trekker

Re: How to create an application using R functions

It works perfectly with Names={"test1","test2","test3"};

But when I hover over Names in my script, it shows me:

Names

{ {"V1", "V2",

...............

I took that to mean that it did contain the list, and Tests is a list in R (I've even added the line Tests<-as.list(Tests) to be sure).

Is it maybe that there are too many items? Although I did put in parameters to make the window bigger but that didn't seem to make any difference.

Other than that I really don't know what I'm doing wrong, I've been at it for hours now...

0 Kudos
olivia_manning
Community Trekker

Re: How to create an application using R functions

Ok so the problem seems to be that in my script there are two "{" instead of just one...

I've just tested Names = {"t1","t2"} and Names = {{"t1","t2"}}

So I'll have to try and figure out a way to fix that.

Sorry for that!

0 Kudos
mewing
Community Trekker

Re: How to create an application using R functions

If Names = {{"t1","t2"}}; try Names[1] - that should get the list nested inside the list.

0 Kudos
olivia_manning
Community Trekker

Re: How to create an application using R functions

Yes, that works perfectly. Thanks!

0 Kudos
Highlighted
olivia_manning
Community Trekker

Re: How to create an application using R functions

I've got things working, not exactly how I want just yet but a decent first draft anyway.

Do you think you could show me how to create a tool from the script ("the button on the toolbar")?

Thanks!

0 Kudos
mewing
Community Trekker

Re: How to create an application using R functions

Page 14 of a recent JMPer Cable covers making Add-ins

http://jmp.com/about/newsletters/jmpercable/pdf/27_winter_2011.pdf

I think the instructions in the cable may be a little better than what I could come up with.  I've been following them to the letter to create addins that anyone in my organization can install without having to have any drives mapped out or anything.

One thing I do in addition to the instructions in the Cable is that once I've registered the addin and I'm customizing my menu/toolbars, I hit the 'Change' button at the top and select the addin I'm currently making a menu/toolbar for and it saves the customization to the working folder.

Hope this helps.

0 Kudos
olivia_manning
Community Trekker

Re: How to create an application using R functions

I'm stuck on step 3, nothing seems to be happening...

I must be doing something wrong:

     I opened a new script and typed

 

registerAddin(

"com.myCompany.myAddin" ,

"C:/Users/.../Desktop/myAddinFolder"

);

and when I run it nothing happens,

I presume something is supposed to happen so that I can then  proceed to step 4?

Thank you so much for all your help

0 Kudos