The devices I will be discussing are detailed here.
Before I begin, it should be noted that the LiveDriveIR plugin allows you to select the MIDI IN device to listen to in order to receive the remote control events.
The problem I'm encountering occurs with a feature built into InputDeviceMapper's configuration. The setup form allows you to "learn" new events to be mapped to Actions. Basically, you click the "Lean Command" button on the form, a window pops up telling you InputDeviceMapper is waiting for input, and then you push a button on your remote (or gamepad or whatever - in this case it is a remote). The captured event is then used to create a mapping. This is accomplished in the following manner:
When the InputDeviceMapper setup form starts, it uses the PluginManager to get a list of all of the plugins. InputDeviceMapper loops through that list looking for plugins that implement the IInputDevicePlugin interface. When one is found (in this case LiveDriveIR), InputDeviceMapper calls it's start() method to ensure that it is listening for events that it will pass to InputDeviceMapper. Once the command is learned, InputDeviceMapper goes through the list again, calling stop() where appropriate to return the plugins (again, LiveDriveIR in this case) to their original state.
This works fine, unless the plugins' (LiveDriveIR's) configuration is changed. Consider the following scenario:
I go into InputDeviceMapper and try to learn a new command. Nothing is happening. I decide that I need to change the selected MIDI IN device in LiveDriveIR, so I close the InputDeviceMapper configuration form, and open LiveDriveIR's. I select the correct MIDI IN device and close the form. I open InputDeviceMapper's setup form again. It uses the PluginManager to get/instantiate the required plugins (LiveDriveIR).
Now, those of you who are observant, and know the Configuration application, will see what's comming. As it turns out, the changes I made to the LiveDriveIR's settings have not yet been written (that's not done until the Configuration Application closes), so when PluginManager instantiates the plugin, it is instantiated with the OLD settings. The upshot is that no matter what I set my device to in the LiveDriveIR setup form, InputDeviceMapper won't benefit from the change until the Configuration application is restarted.
The solution, of course, would be to get the instance of LiveDriveIR that already exists in the Configuration application, rather than using PluginManager to recreate it. Unfortunately, I can't firgure out how to do that. Indeed, I'm not sure it is even possible.
Any suggestions?
Before I begin, it should be noted that the LiveDriveIR plugin allows you to select the MIDI IN device to listen to in order to receive the remote control events.
The problem I'm encountering occurs with a feature built into InputDeviceMapper's configuration. The setup form allows you to "learn" new events to be mapped to Actions. Basically, you click the "Lean Command" button on the form, a window pops up telling you InputDeviceMapper is waiting for input, and then you push a button on your remote (or gamepad or whatever - in this case it is a remote). The captured event is then used to create a mapping. This is accomplished in the following manner:
When the InputDeviceMapper setup form starts, it uses the PluginManager to get a list of all of the plugins. InputDeviceMapper loops through that list looking for plugins that implement the IInputDevicePlugin interface. When one is found (in this case LiveDriveIR), InputDeviceMapper calls it's start() method to ensure that it is listening for events that it will pass to InputDeviceMapper. Once the command is learned, InputDeviceMapper goes through the list again, calling stop() where appropriate to return the plugins (again, LiveDriveIR in this case) to their original state.
This works fine, unless the plugins' (LiveDriveIR's) configuration is changed. Consider the following scenario:
I go into InputDeviceMapper and try to learn a new command. Nothing is happening. I decide that I need to change the selected MIDI IN device in LiveDriveIR, so I close the InputDeviceMapper configuration form, and open LiveDriveIR's. I select the correct MIDI IN device and close the form. I open InputDeviceMapper's setup form again. It uses the PluginManager to get/instantiate the required plugins (LiveDriveIR).
Now, those of you who are observant, and know the Configuration application, will see what's comming. As it turns out, the changes I made to the LiveDriveIR's settings have not yet been written (that's not done until the Configuration Application closes), so when PluginManager instantiates the plugin, it is instantiated with the OLD settings. The upshot is that no matter what I set my device to in the LiveDriveIR setup form, InputDeviceMapper won't benefit from the change until the Configuration application is restarted.
The solution, of course, would be to get the instance of LiveDriveIR that already exists in the Configuration application, rather than using PluginManager to recreate it. Unfortunately, I can't firgure out how to do that. Indeed, I'm not sure it is even possible.
Any suggestions?