Hello,

This error makes sense since your function is called whenever
"subscribeToEvents" get triggered which also happens when the event page (or
creation page) get displayed. What happens is that your gadget detect the
user selecting an event, or a time slot, and show the event page, which
triggers your call back, which shows the event page...

Unfortunately, I am not a Gadget specialist and I am not sure how to work
around this. Can you try adding a flag or something similar and resetting it
when you are on the event page? Not sure if this will work but it might be
worth the try.

Best,
Alain

On Mon, Jun 6, 2011 at 5:26 PM, zoqui <[email protected]> wrote:

>
> I'm trying to programaticaly fill some event data before make it available
> for save, but no success.
>
> After assign new values to the event object received on a 
> google.calendar.read.subscribeToEvents
> handler function,
> the event is continuously triggered and can't be stopped, freezing the
> calendar app.
>
>     // THIS FUNCTION WILL Be called continusly...
>    function onEvents(appointment) {
>      console.log('onEvents');
>      if (appointment) {
>        if ('id' in appointment){
>           appointment['details']='event changed';
>           google.calendar.showEvent(appointment['id']);
>        }
>        else{
>           appointment['details']='a new appointment';
>           google.calendar.composeEvent(appointment);
>        }
>      }
>    }
>
>    gadgets.util.registerOnLoadHandler(function(){
>      google.calendar.read.subscribeToEvents(onEvents);
>    }
>
> Once that I need to know the clicked time slot, the subscribeToEvents
> handler was the only approach I could think,
> really thanks for any help
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Google Calendar Data 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://code.google.com/apis/calendar/community/forum.html
>



-- 
Alain Vongsouvanh

-- 
You received this message because you are subscribed to the Google
Groups "Google Calendar Data 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://code.google.com/apis/calendar/community/forum.html

Reply via email to