I have run into a situation where I renamed some action callbacks and this is causing errors for users because the old callback name is still being targeted after they install the updated plugin version. Users can clear the error by opening up the suspect Action and pointing to the new item. Since
self.actionsTypeDict is built through an introspection of the Actions.xml file in the plugin package, I can't use that to update the Action set. Effectively, what I need to do is something like this:
- Code: Select all
def updateIndigoActionsDict(self):
if 'oldName' in self.actionsTypeDict.keys():
self.actionsTypeDict['newName'] = self.actionsTypeDict['oldName']
del self.actionsTypeDict['oldName']
return self.actionsTypeDict
Alternatively, is there an elegant way to update these references when the new version of the plugin is installed? Maybe the solution is to not rename Action callbacks.