I tried to do this today, and the way posted above is not good.

How it is working:

 $when->setReminders(array($reminder));

instead of:
$when->reminder=array($reminder) ;

This way its fully ok. I spent few hours on it and I suggest to
replace it on google page to safe another users time.

On 24 Mar, 08:20, brian <[email protected]> wrote:
> I'm no expert but I think your problem might be ..
>
> $when->reminder=array($reminder)
>
> has to look like
>
> $when[0]->reminder=array($reminder)
>
> hope it works for you,
> brian.
>
> On Mar 18, 10:22 am, ogierepier <[email protected]> wrote:
>
>
>
>
>
> > Hi,
> > I am trying to set a reminder to an event in my calendar. I followed
> > the examples the developers guide gives. Yet I get an error that the
> > function getEvent is undefined. So we loaded the class that contains
> > the getEvent function Zend_Gdata_, we got no error but the reminder
> > still isn't added. Here's the example:
>
> > functionsetReminder($client, $eventId, $minutes=15)
> > {
> >   $gc = new Zend_Gdata_Calendar($client);
> >   $method = "alert";
> >   if ($event = getEvent($client, $eventId)) {
> >     $times = $event->when;
> >     foreach ($times as $when) {
> >         $reminder = $gc->newReminder();
> >         $reminder->setMinutes($minutes);
> >         $reminder->setMethod($method);
> >         $when->reminder = array($reminder);
> >     }
> >     $eventNew = $event->save();
> >     return $eventNew;
> >   } else {
> >     return null;
> >   }
>
> > }
>
> > Is this a common problem?
> > And can you help us?

--~--~---------~--~----~------------~-------~--~----~
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://groups.google.com/group/google-calendar-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to