MIDI2LR icon indicating copy to clipboard operation
MIDI2LR copied to clipboard

Best way to ensure clean/fresh load?

Open StevenKersting opened this issue 10 years ago • 4 comments

I'm trying to make some changes and I want to know the quickest/best way to reload the app cleanly. I'm currently shutting down the plugin and LR.

I'm trying to make changes to profiles.lua so that if I call a profile in a subfolder with a relative or absolute link set in the options, it then looks for the next profile in that folder instead of the profile folder defined in the settings dialogue. But I'm having no luck.

StevenKersting avatar Feb 04 '16 23:02 StevenKersting

LR really hangs on to this plugin, so the best way to reload cleanly is to exit LR, then restart it. If the plugin crashes, you might be able to reload it using plugin manager, and you might get the new plugin loaded, but it is not consistently so.

rsjaffe avatar Feb 05 '16 02:02 rsjaffe

OK, thanks. Any suggestions on how to accomplish what I'm trying to do? It doesn't seem to be controlled by any of the functions in profiles.lua.

StevenKersting avatar Feb 05 '16 03:02 StevenKersting

The plugin sends a string to the app consisting of the profile's file name, without any path. The message is received in LR_IPC_In.cpp with m_profileManager->switchToProfile(valueString.trim());, which dispatches the string to the switchToProfile method of profilemanager. So the following method in ProfileManager.cpp has to have an appropriate string: void ProfileManager::switchToProfile(const String& profile).

I didn't write that method (Parth did before turning the development over to me) so I haven't tested what happens when you send a string with directory paths in it.

My first suggestion is to try entering a string of the form subdirectory/profilename.xml and see if that works.

rsjaffe avatar Feb 05 '16 15:02 rsjaffe

Merged into #173

rsjaffe avatar Feb 06 '16 19:02 rsjaffe