June 12, 201510 yr Is there any way that something can be added to the SMGetRegisteredModules to get us a version number too?? I have got an error reporting script which lets me know system variables when a big error occurs with one customer, but I have no way of seeing if the version of the loaded function is the most recent. john
June 12, 201510 yr Maybe I misunderstand, but isn't the "version" something you would need to add in yourself (also meaning that you could device a way of returning the versions? I guess you're using the ScriptMaster plugin as is, not compiling your own custom plugin. What would be cool for that case is to somehow be able to return the source of the registered function(s) - the same thing you use when you create the function. That might be even more useful than a version number?
June 13, 201510 yr Author What I am after - in my pipe dream world - is that there is some way of the SMGetRegisteredModules to include a version number in the same way that Get ( InstalledFMPlugins ) does I can do put //v1.5 s the first line in my functions so I can read it in the scripts, but I am trying to track down if the version I think is loaded has been superseded somewhere else in the system...
June 14, 201510 yr OK, makes sense. I mostly use custom plugins so I don't have this issue in the same way, but if that doesn't work in your scenario (I'm guessing you add new functions all the time), what I could imagine doing adding an extra parameter to each function to have it e.g. return the version number into a variable. This is of course a bit extra work, but it might help in a scenario where different version of the same function may get registered without a given script "knowing" it. And/or, you could even check the version BEFORE executing each function... Maybe that's even something you can build into each function - you feed it the expected version(s) as a parameter, and then if the version doesn't match, you either return an error or if it might still work, create a log entry or something.
Create an account or sign in to comment