Skip to main content
Inspiring
August 11, 2007
Question

onSync question need answer plz help

  • August 11, 2007
  • 2 replies
  • 321 views
Do I have to specify a remote shared object in the onsync event of my main application ? What are the consequences of not setting the object in the main applications onSync events?

Because i have a remote shared object that works properly as long as i don't specify it in the onsync event of the main application........the object is being set as SO.data.slot0 = SO.data.slot0*1 +1; in the main application

The initial value of SO.data.slot0 is being set outside the main application in an admin console to the value of 1.
    This topic has been closed for replies.

    2 replies

    Inspiring
    August 11, 2007
    the reason it was causing problems is because i was incrementing the number so it continued to fire ..........this is the code for the problem
     SO.data.slot0 = SO.data.slot0++;
    


    I'm not 100% positive why this caused onsync to fire continueously but when i removed it the onsync function was normal and the app continued to work perfectly so i thought i would ask an expert if there is any light you feel that is important to shed on this subject plz feel free to add your 2 cents.
    August 11, 2007
    No, you don't absolutely need it. The onSync handler is there to respond to changes in the data... nothing more. If you don't need the server side app to do anything when a client changes the SO data, you don't need a server side onSync handler.

    That said, I'd be asking myself why the server side onSync event is causing problems with the SO, rather than just removing the handler and forgetting about the problem.