Thanks for comments, all. Now suppose I want the gadget to receive a "state change" notification every time the state has changed. (I don't want to have to continually poll an external site to see if something has changed; I want a callback notification.)
Is it true that: 1) There is no good way to get a "state-change" callback if I use the method where I manually store state in an external site? 2) If I use the robot to manage the state, I _will_ get a callback when a robot changes the state of any gadget? Thanks, Rob On Nov 10, 9:27 pm, Vikram Dhillon <dhillon...@gmail.com> wrote: > Hi, > This could be possible, use a static variable > to keep the track of the state and then since there's only one copy of > that variable, it can accessed at any point in the program/robot :) > > -- > Regards, > Vikram > > On Tue, Nov 10, 2009 at 1:37 PM, Austin Chau (Google employee) > > <api.aus...@google.com> wrote: > > No gadget states are specific to each gadget and not shared among other > > gadgets within the same wave. > > > There are several ways to maintain "state" among different gadgets of the > > same wave, you can maintained your own persistent storage on remote server > > and use some crossdomain mechanism (jsonp, script injection, etc) to share > > data. You can also use wave robot to maintain data for you and store them > > on the wave data document. > > > Austin > > > On Tue, Nov 10, 2009 at 10:00 AM, rgibson <rgib...@astro.washington.edu> > > wrote: > > >> I would like to share state between multiple gadgets. When I read the > >> wave gadgets tutorial, it sounded as if the state was stored at the > >> Wave level. (E.g., call wave.getState() to get the state, gadgets > >> "share state", etc.) So there would be one "count" per Wave, not one > >> "count" per gadget. > > >> Of course, this introduces its own problems (e.g., every gadget > >> developer has to know about the namespace of every other gadget.) And > >> a quick check shows that if you run two examples of the "count" > >> example gadget, they each have their own "count" variable that updates > >> independently. > > >> So is there a way for two gadgets in a Wave to share their state? Or, > >> what's the best way to do this? > > >> I am new at this and trying to poke my way through the documents, but > >> I've gotten to the point where it's better to ask. > > >> Thanks, > >> Rob --~--~---------~--~----~------------~-------~--~----~ 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-wave-api@googlegroups.com To unsubscribe from this group, send email to google-wave-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-wave-api?hl=en -~----------~----~----~----~------~----~------~--~---