john renfrew Posted June 12, 2015 Posted June 12, 2015 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
David Wikström Posted June 12, 2015 Posted June 12, 2015 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?
john renfrew Posted June 13, 2015 Author Posted June 13, 2015 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...
David Wikström Posted June 14, 2015 Posted June 14, 2015 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.
Recommended Posts
This topic is 3461 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 accountSign in
Already have an account? Sign in here.
Sign In Now