Hi, I'm creating both a robot and a gadget, and the two communicate by
the gadget's state object. However, I'm having a bit of trouble
because it seems like sometimes the robot sets gadget state on the
server-side but this isn't reflected in the client side. Let me
explain.
I have a gadget that listens to state change events with code like
this:
// GADGET CODE
gadgets.util.registerOnLoadHandler(function() {
wave.setStateCallback(onStateCallback);
});
function onStateCallback() {
// do stuff with wave.getState() object
}
// other event handlers that sometimes call wave.getState().submitDelta
(deltaObj);
// END GADGET CODE
On the (Java) server-side I have a robot that occasionally appends or
modifies the gadget state via calls like this:
// ROBOT CODE
theGadget.setField("aKey", "aValue");
// END ROBOT CODE
Observations:
1) The robot always seems to see the state updates that the gadget
makes via submitDelta
2) The gadget usually but doesn't always see the updates that the
robot makes via setField; more precisely, the onStateCallback doesn't
always fire after the robot called setField on the server-side
The oddest thing about observation 2 is that set the log level for
AbstractRobotServlet to INFO and verified via the serializeOperations
log message that the missing in action setField operations are
actually getting sent back from the robot.
Does anyone know why the gadget's onStateCallback method doesn't
always see the server-side changes? Are there any gotchas in this
area?
Thanks,
Bill
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---