Your setStateCallback() looks correct. When you call wave.getState().submitDelta(delta), does your callback get called?
On Sep 28, 5:25 am, dLux <[email protected]> wrote: > I've just playing around with gadgets, but it seems that the state > change event is not fired. > > The initialization function is called properly, which registers the > state and the participant callbacks. > The participant change callback called properly, but the state > callback is never called. Shouldn't it be called at least once after > initialization? > > Here is the code, it seems to be totally OK for me: > > // Called when the gadget state is updated. > function stateUpdated() { > alert('state updated.'); > redrawContent(); > > } > > // Called when a new participant is added to the wave. > function participantsUpdated() { > alert('participants updated.'); > redrawContent(); > > } > > // Initialization function. > function init() { > if (wave && wave.isInWaveContainer()) { > wave.setStateCallback(stateUpdated); > wave.setParticipantCallback(participantsUpdated); > alert('callbacks initialized.'); > } > > } > > gadgets.util.registerOnLoadHandler(init); > > Any idea? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Wave API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-wave-api?hl=en -~----------~----~----~----~------~----~------~--~---
