Jump to content

5.01 incompatible with 4.42 functions


This topic is 2535 days old. Please don't post here. Open a new topic instead.

Recommended Posts

in the older version the function would be

RegisterGroovy( "SMisLoaded" ; "return true; isGui=false" )

 

now it is 

RegisterGroovy( "SMisLoaded" ; "return true"; "isGui=false" )

 

therefore ALL functions written with previous version fails

 

ANY SUGGESTIONS??

Edited by john renfrew
Link to comment
Share on other sites

John,

The main issue is that the RegisterGroovy function in ScriptMaster v5 isn't treating the third parameter optionally, even though it's inside curly braces:

##  ScriptMaster v5
##  RegisterGroovy( signature ; script {; isGui ; key1=value2 ; ... } )
##  omitting third parameter in RegisterGroovy function returns 
## "java.lang.ArrayIndexOutOfBoundsException: 0" instead of 1

Let (
  
  ~result = RegisterGroovy( "SMisLoaded" ; "return true;" ) ;
  Case ( ~result = "ERROR" ; SMLastError ; ~result ) 
  
) 

The secondary issue is that the RegisterGroovy function in ScriptMaster v4 looked for “isGui=false” an optional “key=value” pair. I don’t think including it at the end of the groovy script actually did anything, especially after "return true" processed.

##  ScriptMaster v4
##  RegisterGroovy( signature; script{; key1=value1; key2=value2; …} )

##  best practice if you don't need a GUI
    RegisterGroovy( "SMisLoaded" ; "return true;" ; "isGui=false" ) ;

##  not wrong, just doesn't affect the GUI
    RegisterGroovy( "SMisLoaded" ; "return true; isGui=false" ) ;

We'll let you know when we have an update.

Michael

Link to comment
Share on other sites

Thanks Michael

My version of the file that I have been developing in for quite are years with the plugin gives 

"return true; isGui=false" 

We need a way for 16 and pre 16 to exist in the same environment, and I am not sure I like the idea of adjusting all my scrip steps, as you  know i am a heavy user of the plugin..

 

john

Link to comment
Share on other sites

John,

Again, there's a bug in ScriptMaster v5 which is causing an error if the third parameter is empty. Once that is fixed your functions should resume working as they have before. However, adding "isGui=false" to the end of your script (as the second parameter) doesn't do anything except make your function run a little slower than if you were to leave it out completely:

## how "isGui=false" is passed to RegisterGroovy

   RegisterGroovy ( "Test1" ; "return true;" )               
   RegisterGroovy ( "Test2" ; "return true; isGui=false" ) ## your script    
   RegisterGroovy ( "Test3" ; "return true;" ; "isGui=true" ) 
   RegisterGroovy ( "Test4" ; "return true;" ; "isGui=false" ) ## recommended

## Total time is takes to call each registered function 1000 times:

   Test1: 4588 ms 
   Test2: 4864 ms ## your script
   Test3: 5223 ms
   Test4:   93 ms ## recommended

You can test this with ScriptMaster v4 for now:

http://s3-external-1.amazonaws.com/com.prosc.support.uploads/Outbound/ScriptMasterGuiTest.fmp12.zip?AWSAccessKeyId=AKIAIDQUCQL7APZLJCDA&Expires=1497109423&Signature=f7C5P0zEz193czErKG83a8VRNhM%3D

Michael

Link to comment
Share on other sites

Thanks for the prompt attention

The 5.02 version on the site seems to work as I expected, will look at amending the script steps as required..

Are you sure??

here's my results

 

Screen Shot 2017-05-11 at 17.09.41.png

Link to comment
Share on other sites

OK, to clarify that was 5.02 on 16

THIS is 4.42 on 15

 

Screen Shot 2017-05-11 at 17.22.26.png

 

And. Sorry, I mis-spoke as they say

the script couldn't see the functions

this is 5.02 in 16

 

Screen Shot 2017-05-11 at 17.32.01.png

Edited by john renfrew
Link to comment
Share on other sites

Link to comment
Share on other sites

This topic is 2535 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.