--
You received this message because you are subscribed to the Google Groups "Google Wave API" group.
To post to this group, send email to google-...@googlegroups.com.
To unsubscribe from this group, send email to google-wave-a...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-wave-api?hl=en.
--
You received this message because you are subscribed to the Google Groups "Google Wave API" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-wave-api/-/sYVnqUVNzOsJ.
callback to gadgets.util.registerOnLoadHandler is event that notify that gadget infrastructure and it's container is ready. thus you can set handlers to perform communication with parent window: set gadget's height, get stored state
gadget wave api is also using that handler to do it's internal init:
/** * Internal initialization. */ wave.internalInit_ = function() { wave.checkWaveContainer_(); if (wave.isInWaveContainer()) { gadgets.rpc.register('wave_participants', wave.receiveWaveParticipants_); gadgets.rpc.register('wave_gadget_state', wave.receiveState_); gadgets.rpc.register('wave_state_delta', wave.receiveStateDelta_); gadgets.rpc.register( 'wave_private_gadget_state', wave.receivePrivateState_); gadgets.rpc.register( 'wave_private_state_delta', wave.receivePrivateStateDelta_); gadgets.rpc.register('wave_gadget_mode', wave.receiveMode_); gadgets.rpc.call(null, 'wave_enable', null, '1.0'); } }; /** * Sets up the wave gadget variables and callbacks. */ (wave.init_ = function() { if (window['gadgets']) { gadgets.util.registerOnLoadHandler(function() { wave.internalInit_(); }); } })();
at that time wave api initialize state object but it's null and then it registers to opensocial rpc listeners which will transfer state deltas, participants, etc. and only after that it will be able to receive any data
In my practice and according to wave api's asynchronous model you shouldn't perform state actions until setStateCallback is fired for state and setParticipantCallback for participants
Ah, I suppose that does make sense. Thank you for clarifying that.
—Zachary “Gamer_Z.” Yaro
To view this discussion on the web visit https://groups.google.com/d/msg/google-wave-api/-/XRSPoc0WZCsJ.
Yes, it made me really happy to see someone else on this forum :)
—Zachary “Gamer_Z.” Yaro
To view this discussion on the web visit https://groups.google.com/d/msg/google-wave-api/-/RLatXuwAcmsJ.