bunkat / schedule

Automatically schedules tasks, work items, meetings, reservations, etc. Schedule takes into account working hours, holidays/days off, people's work schedule/vacation time, as well as task dependencies.
http://bunkat.github.io/schedule/
MIT License
427 stars 87 forks source link

Issue running example in browser #1

Closed dchun closed 10 years ago

dchun commented 10 years ago

Hello,

I'm trying to test out the example schedule on browser.html but I'm getting the following error:

Uncaught TypeError: Object function tasks(data) { var items = [], fid = schedule.functor(id), fduration = schedule.functor(duration), favailable = schedule.functor(available), fresources = schedule.functor(resources), fdependsOn = schedule.functor(dependsOn), fminschedule = schedule.functor(minSchedule), fpriority = schedule.functor(priority); for (var i = 0, len = data.length; i < len; i++) { var task = data[i], item = { id: fid.call(this, task, i), duration: fduration.call(this, task, i), available: favailable.call(this, task, i), resources: fresources.call(this, task, i), dependsOn: fdependsOn.call(this, task, i), minSchedule: fminschedule.call(this, task, i), priority: fpriority.call(this, task, i) }; items.push(item); } return items; } has no method 'schedule' browser.html:75 (anonymous function) browser.html:75

Any idea what might be the cause?

bunkat commented 10 years ago

Yes, looks like I never updated the examples when I renamed one of the methods. It should be fixed now if you grab the latest examples from GitHub or NPM. Sorry about that!

dchun commented 10 years ago

Thanks Bill!

I'm going through your documentation and I must say that out of a lot of the scheduling modules out there yours is extremely well thought out. Kudos!

Dave

bunkat commented 10 years ago

Thanks, let me know how it works out for you and if you have any other questions.