I agree with Jorran, will be nice have a callback with CF.setJoin. I am already using setTimeout, but sometimes dont work.
Use CF.setProperties some times its not a easy thing. Every time that i make a setProperties i test using the debug, but the animation with the debug on its one thing and with the debug off its another thing.
See this simple function to set the properties of a list, when the subpage hide (without the setTimeout for now, just for example):
self.hideListWindow = function(){ var listShow= "l"+self.joinSubXBMC+4;
CF.setJoin("d"+self.joinSubXBMC+2,0);
CF.setProperties([{join:listShow,h:1,opacity:0}]);
}
This will make the list has the opacity 0 and a small size (1).
Now see the CF.setProperties to show the list (i have several lists, this function take care of all, i am only showing the CF.setProperties)
CF.setProperties([{join:imageShow,x:imageX,y:imageY}],0.0,0.5,CF.AnimationCurveEaseInOut,function(){
CF.setProperties([{join:listShow,x:listX,y:listY}],0.0,0.1,CF.AnimationCurveEaseInOut,function(){
CF.setProperties([{join:listShow,h:listH,opacity:1.0}],0.0,0.5,CF.AnimationCurveEaseInOut)
});
})
This will set the image background to be placed before display the list, its only one image background for the lists, the position of the image depend of the position of the button that call the function. After the image is in the right place, the list will be displayed.
Now, if the image its not in the right place, this function works fine with the debug on or off. The image will move for the right place and then the list will be displayed. But if the image its already in the right place (called with the same button) and the debug its off i cant see the animation of the list. When the subpage display, the list is almost in the right place.
If the debug is on i can see the list animation, when the subpage show, i see the image in the right place, then i see the animation of the list.
Its hard to explain. In resume, if the debug is on, everything works fine. If the debug is off and we have items that already have the same properties that we want to set, the animation of the items with different properties will run first, in the exemple :
With the debug on, the list will start to move after 0.5 seconds.
With the debug off, the list will start to move in 0.0 seconds, sometimes the list move before the subpage displayed, i have to use a delay to avoid this.
Clayton