Custom Data provider question |
Post Reply |
Author | |
nemanjas
Newbie Joined: 04 August 2006 Status: Offline Points: 11 |
Post Options
Thanks(0)
Posted: 04 July 2007 at 8:25am |
Hi,
I'm using MSSQL data provider example as a staring point to make my own provider. I've modified open/close/DoRetrieveDayEvents methods, and others are just returning NULLs. Helper method are also modified, and they seem to return valid data. Problem is that Calendar control crashes upon executing Populate method. Since i'm just evaluating toolkit, i have no idea what happens inside Populate method and why it crashes? Any ideas? |
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
Hi,
Take a look at the following article: It describes ActiveX version, but concepts are same. The thing you should note is:
-- WBR, Serge |
|
nemanjas
Newbie Joined: 04 August 2006 Status: Offline Points: 11 |
Post Options
Thanks(0)
|
Thank, but as you can see, i've implemented DoRetrieveDayEvents handler.
Problem is that Calendar control crashes, its not empty as that article is saying. My implementation DoRetrieveDays returns valid CXTPCalendarEventsPtr, with, hopefully, valid data. And again, on Populate, control crashes. To be precise it asserts. On line 1543 (check screenshot). Thanks, Nemanja. |
|
nemanjas
Newbie Joined: 04 August 2006 Status: Offline Points: 11 |
Post Options
Thanks(0)
|
Forum ate my screenshot link :)
http://img381.imageshack.us/img381/5083/codejockeylq7.jpg |
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
Well...
Which version do you use? Is it an eval version or registered? If you have toolkit sources - try to debug it to see where the problem is (press Retry in ASSERT dialog). In any case try to localize a problem using following tricks: -- do not return (add to collection) events in DoRetrieveDayEvents. Is it working OK? -- create one or 2 events manually and return them from DoRetrieveDayEvents. Is it working OK? -- check your code which create events. Trace created events (at least start/end date-times) -- check whether you work carefully with InternalAddRef / InternalRelease If you will have no success - send us your project to analize a code into support area. -- WBR, Serge |
|
nemanjas
Newbie Joined: 04 August 2006 Status: Offline Points: 11 |
Post Options
Thanks(0)
|
It's a evaluation, so i cant see whats asserting...
Anyways, if i return empty items array on DoRetrieveDayEvents, control is working ok, so there must be something wrong in the way i'm creating events? If I manually create event and event list, control asserts. This is what i have in current event handler: CLProvider::DoRetrieveDayEvents(COleDateTime dtDay) { InternalAddRef(); CXTPCalendarEventPtr pItem = CreateNewEvent(12345); pItem->SetSubject("Subject"); pItem->SetStartTime(COleDateTime::GetCurrentTime()); pItem->SetEndTime(COleDateTime::GetCurrentTime()); CXTPCalendarEventsPtr pItems = new CXTPCalendarEvents; pItems->Add(pItem); InternalRelease(); return pItems; } Can you see anything wrong with it? Another thing, could you post what line 1543 from xtpcalendarviewday.h looks like? Thanks, Nemanja |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |