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
Highlighted
wjalford
Level III

Cannot save current window dt.

I added a prompt date text box to my code and now the dt = open database will no longer store the open window name in dt.  I am getting the error Send Expects Scriptable Object in access or evaluation of 'Send' , dt << /*###*/save(

 

Any help would be appreciated.  I have tried to use current open table but it does not recognize the new table.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
wjalford
Level III

Re: Cannot save current window dt.

Jim,

 

I figured it out.  I had to move my dt = open database up into the runScript routine.  It was outside the routine which caused my issue.  Thank you for replying.  Your input helped me look at my code based on the timing.

 

Thanks again,

 

Wayne

View solution in original post

6 REPLIES 6
Highlighted
txnelson
Super User

Re: Cannot save current window dt.

I assume the dt<<save() statement is trying to execute before the data table has been read in completely.  I suggest you add in

dt << run formats;

before the << Save statement, to force JMP to complete the creation of the data before trying to save it.

 

Jim
Highlighted
wjalford
Level III

Re: Cannot save current window dt.

Jim,

 

I have added your suggested line.  I get the following error "Send Expect Sriptable Object in access or evalation of 'Send', dt <</*###*/runformats/*###*/.  When I run the debugger the variable dt has a value of Data Table ("Metals Core LIMS V7").  I hope this helps.

 

Regards,

 

Wayne

Highlighted
txnelson
Super User

Re: Cannot save current window dt.

The issue still seems to be that the variable "dt" is not created, which is a pointer to that you data table has not completed it's creation.  Try replacing 

dt << run formats

 

with 

 

wait( 10 );

 

 

and see what it does.

Jim
Highlighted
wjalford
Level III

Re: Cannot save current window dt.

Jim,

 

Same error.

 

Regards,

 

Wayne

Highlighted
wjalford
Level III

Re: Cannot save current window dt.

Jim,

 

I figured it out.  I had to move my dt = open database up into the runScript routine.  It was outside the routine which caused my issue.  Thank you for replying.  Your input helped me look at my code based on the timing.

 

Thanks again,

 

Wayne

View solution in original post

Highlighted
wjalford
Level III

Re: Cannot save current window dt.

Jim,

 

I can open another discussion if neccesary but I have another question for you.  I have the date prompt as modal to keep the window open until the user enters the date range.  After they hit the button "Get Data" I would like the window to close.  In the buttonbox ("Get Data", runscript) the runscript has runscript = Expr(nw<<Close Window;  but the window stays open and the rest of the script does not run until I force the window to close.  Any suggestions?

 

Regards,

 

Wayne

Article Labels

    There are no labels assigned to this post.