I created a WebGui for the Adafruit16CServoDriver. Since I'm not good at GUI development, I used copy/paste programming, using the ServoGUI as a template.
Most of it works ok, but I found a problem that I don't know how to solve.
The problem is that the dropdown list with available services gets populated with the same values in both the ServoGUI and the Adafruit16CServoDriverGUI. The values are different depending in what order I start the services.
First I start the Servo service, and the list gets populated with all running services that implements the ServoController interface. Good.
Next I start the Adafruit16CServoDrive, and the list gets poplated with all running services that implements the I2CControl interface. Good.
However, both the ServoGUI and the Adafruit16CServoDriver listens to the getServiceNamesFromInterface method from runtime, so the list in ServoGUI gets repopulated with the values that Adafruit16CServoDriverGUI requested. Doh.
Any suggestions on how to solve this problem ?