Appgutta / AGCalendar

Calendar module for Titanium
Other
80 stars 25 forks source link

Issue with Displaying multiple events from datasource #20

Closed Corliosity closed 11 years ago

Corliosity commented 11 years ago

Hello,

I am trying to use the calendar and display multiple events from a JSON file but these become duplicated in coredata and do not show in eventkit. I have tried using the temp fix to no avail. is there a solution on the way? I am willing to pay if that will help.

Thank you,

Corliosity commented 11 years ago

I think I may have found the problem. This error seems to exists because of the identifier duplication. If while using coredata you have the identifier set to offer an info statement will print "An event with the same identifier already exists." Could it be possible to use this method to keep multiple events from showing?

Screen Shot 2012-12-11 at 9 52 04 AM

ChrisRM commented 11 years ago

Please gist or send me the file that uses the calendar, and I'll see what I can do.

Corliosity commented 11 years ago

OK, I am attaching the code with the events call and the calendar display.

Thank you for your help,

-Andrew

On Dec 13, 2012, at 4:32 AM, Chris Magnussen notifications@github.com wrote:

Please gist or send me the file that uses the calendar, and I'll see what I can do.

— Reply to this email directly or view it on GitHub.

ChrisRM commented 11 years ago

Waiting for the code...

Corliosity commented 11 years ago

Sorry for the delay and forgetting to include code.

The gist file is located here:

https://gist.github.com/db4dbb8c79536da5500f

ChrisRM commented 11 years ago

https://gist.github.com/db4dbb8c79536da5500f#comment-632123

Corliosity commented 11 years ago

Hey Chris,

Thanks for the fix.

However I have noticed that since 1.2.5 and 1.2.6 came out I can no longer display my data from an external source. I have my code on a gist account here: https://gist.github.com/cf429a90f3622e327c59

Do you know the reason?

clseva commented 11 years ago

It's a bug. Chris is working on it. See: https://github.com/Appgutta/AGCalendar/issues/23

Corliosity commented 11 years ago

Thanks

Corliosity commented 11 years ago

Hey Chris when using Coredata as the data source we still get event duplication even when passing a timeout function. Can you take a quick look for me please? Thanks!

https://gist.github.com/8deee7d1a7e6af371676

Or could it be a problem with how I am calling and adding data?

Sorry for taking up time but thank you for all of your help.

Corliosity commented 11 years ago

This is what i got from one of our other developers working on the issue:

The only problem I see in here is that events are being added every time the app runs. The identifier we get from Ti.Calendar.identifier generates a new hash at each request, that makes me think this could be the source of the problem.

Corliosity commented 11 years ago

Sorry for opening and re-opening my group has figured out a way to solve this problem through the API:

What do you guys think if we create our on fix? Is it easy to send another parameter with the JSON? Let's say we send a udid along each event. When we events: If they have a different UDID, we add it, otherwise the module verifies on its own that the event already exists and don't add it :)

The unique identifier keeps it so that the events will not appear more than once.