My favorites | Sign in
Project Home Issues
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 57: Error in the documentation
2 people starred this issue and may be notified of changes. Back to list
Status:  Done
Owner:  ----
Closed:  Jul 2009


Sign in to add a comment
 
Reported by Max.Kama...@gmail.com, Jul 9, 2009
Error in the documentation on this page
http://arshaw.com/fullcalendar/docs/#event-feeds-and-sources

written: 

events: function(start, end, callback) {

   // do some asynchronous ajax
   $.getJSON("/myscript",
      {
         start: start.getTime(),
         end: end.getTime()
      },
      function(result) {

         // format the result into an array of 'CalEvent' objects
         // (not seen here)

         // then, pass the 'calevent' array to the callback
         callback(calevents);

      });

}

should write:

events: function(start, end, callback) {

   // do some asynchronous ajax
   $.getJSON("/myscript",
      {
         start: start.getTime(),
         end: end.getTime()
      },
      function(calevents) {

         // format the result into an array of 'CalEvent' objects
         // (not seen here)

         // then, pass the 'calevent' array to the callback
         callback(calevents);

      });

}
Jul 18, 2009
Project Member #1 adamrs...@gmail.com
Max, thanks for the input, but I purposely used 2 different variable names. this 
example is meant to show people what to do if they have a feed (json or not) that is 
NOT already using the standard CalEvent objects in JSON. I noted in the comment that 
developers need to massage their 'result' INTO an array of 'calevents'. Probably should 
make it XML or something to drive the point home.
Status: Done
Dec 15, 2009
#2 david.m....@gmail.com
Sorry to drag up an old post, and not even sure if this will show up as a recent post
or just stay buried, but I spent the past hour trying to figure exactly this problem
out. I'm returning JSON objects but have to marshal them into calEvent objects. Well
duh. Maybe this should be made more clear in the documentation? Thanks.
Dec 19, 2009
Project Member #3 adamrs...@gmail.com
i'll definitely change this because it's clearly confusing people, but i don't
understand where the confusion is occurring. was it b/c you copied and pasted the
example, and didnt realize it was expecting you to define a calevents variable (a la
the "not seen here" comment)?
Dec 19, 2009
#4 david.m....@gmail.com
Yes actually, I think that having a small bit that shows exactly what you meant about
marshalling them into calEvent objects would have made it more clear. I will admit to
having been tired when I went through that problem though, so I'm sure that
contributed to my difficulty. Still, a few lines of code that demonstrate your intent
I think would go a long way to helping somebody trying to pick up your plugin and run
with it. 

BTW You've done a spectacular job of documentation so far though, many many kudos for
that. And thanks for taking the time to care about helping out your users.
Dec 21, 2009
Project Member #5 adamrs...@gmail.com
thanks for the compliments david. i've actually been reworking the docs a little this
weekend. when i'm done, they'll be a lot easier to browse and there will be a lot
more examples. i'll revamp this example before making it live. thanks
Sign in to add a comment

Powered by Google Project Hosting