That is the only reason you'd get such behavior. Clear out any actions in the Activity's ActionList.
Or, alternatively, try this but removing actions in the Activity's Actionlist is much easier.
var w= CF.widget("HIDDEN_POWER_ON", "DEVICE_PREPRO_HIDDEN", "DEVICE_PREPRO");
CF.activity().scheduleAfter(50,function(mywidget){mywidget.executeActions();},w);
What will happen here is that after 50 milliseconds of completing the actionlist (remote becomes idle), your function will be called and will pass the value of 'w' which is your widget. When function executes, it will then execute the actions of the widget passed in.
Note that this approach assumes you have all delays in a single actionlist. If not and your actions are spread across multiple widgets, simply do multiple scheduled calls against different widgets as in:
var w= CF.widget("HIDDEN_POWER_ON", "DEVICE_PREPRO_HIDDEN", "DEVICE_PREPRO");
var w2= CF.widget("HIDDEN_POWER_OFF", "DEVICE_PREPRO_HIDDEN", "DEVICE_PREPRO");
CF.activity().scheduleAfter(50,function(mywidget){mywidget.executeActions();},w);
CF.activity().scheduleAfter(100,function(mywidget){mywidget.executeActions();},w2);
And remember that if your widget contains a Jump, you will get an ActionList Error (do a search) that should be handled by using a Try/Catch. This whole try/catch logic necessity is what caused Widget.scheduleActions to be introduced.
Lyndel
Last edited by Lyndel McGee on June 27, 2012 00:12.