As discussed in the main OpenBeOS.MediaKit.Controllable page, nodes deriving from BControllable
provide a means to present a standard interface (both in user appearance and for software (and developers)
accessing the controls through the MediaKit API). Please familiarise yourself with this before continuing.
There are a few problematic issues with the current BControllable Implementation - we will address these
before looking at further changes.
The 'Broadcast' problem
In order to keep all on-screen controls up to date, node developers can choose to implement the
'BroadcastNewParameterValue' function in their SetParameterValue method. In short, each time the value
of a specified parameter is changed, the node will broadcast the updated value to all interested parties.
Failure to call this function will mean on-screen controls will not update with changes, and show
incorrect parameter values.
The issue here is that each time an on-screen control is updated - SetParameterValue is called again
with the new value. If there are two or more controls updating, heavy system loads can cause a lag
in the processing of new parameter values - resulting in the controls falling out of syncm where each
control will constantly broadcast what it thinks to be the 'correct' value.
The following solutions are available :
- Do not implement BroadcastNewParameterValue in your nodes. This solution is not recommended
as it prevents your node from autoupdating its displayed controls.
- Ensure that onscreen controls do not call BroadCastNewParameterValue as the result of a previous
broadcast request. Possibly achievable through a new Theme
- Changes to the API/messaging system that result in a call to update display (via GetParameterValue),
rather than SetParameterValue
DavidShipman