| Reply | « Previous Thread | Next Thread » |
|
Hi,
I am trying to implement CalChangeNotification() for changes in calendar api. The migration guide with 9.2 sdk says section: CallBack Interface ........ class MCalProgressCallBack virtual void CalChangeNotification(TChangeEntryType aChangeEntryType) = 0; But the same sdk help for class MCalProgressCallBack does not list any such function. But CalChangeNotification() is part of MCalChangeCallBack2 class. So one should implement a class derived from both MCalChangeCallBack2 and MCalChangeCallBack, to access calendar api. Is there any documentation or sample code for implemetation of CalChangeNotification(). regards arun |
|
it is always possible that there is a mistake in the documentation, and if so, then you should check the right implementatio informations directly from the headers.
yucca |
|
Hi Yucca,
Agreed. More over there are two classes, MCalChangeCallBack2 and MCalChangeCallBack. I used MCalChangeCallBack2. I implemented a class by deriving from both the classes. But i see a very surprising behavior: I have a AppUi class which creates two active objects, one for todo and another for other calendar data. For todoactive object i do not have a CalChangeNotification, so derived from only one class. for other class i have both. While opening the CCalEntryView, we are suppossed to start a wait loop which will be unblocked by a call to completed(TInt) function of MCalChangeCallBack. In my case i started the todoactive object first and goes in to the wait loop, then creates the calendar active object. When i open the CCalEntryView from the second active object, the first active objects, completed function is called, but the second active object wait loop is stopped? It will be nice if some one can give sample code for CalChangeNotification. I am also not sure whether the issue is somewhere else.... regards arun |
|
Hi,
This is really funny. I could finally make the class work. 1) You will have to derivefrom both the interfaces: for example: class CCalendarHandler : public CHandler, public CActive, public MCalProgressCallBack,public MCalChangeCallBack2 { }; 2) Implement the Completed() function. 3) CCalEntryView::NewL() should be followed by the wait loop. I could never make it work by using CActiveSchedulerWait, but it works with CActiveScheduler::Start(). Please remember that you use CActiveScheduler::Stop()in completed() function. 4) Implement void <>::CalChangeNotification(RArray<TCalChangeEntry>& aChangeItems) if you need notifications for changes from database. Hope this helps all. regards arun |
|
Hi everyone,
I implemented everything that is needed and can receive notifications when the Calendar is changed from outside my program. However, I constantly change and update the calendar from MY own program, but when I do so, the notification function CalChangeNotification() does not get called. Does anybody know why? Is notification only for applications outside my own? |
| roy_weinberg |
| View Public Profile |
| Find all posts by roy_weinberg |
|
Hello,
as stated in Symbian OS v9.3 » Symbian OS reference » C++ component reference » Application Engines CALINTERIMAPI » MCalChangeCallBack and in Symbian OS v9.3 » Symbian OS reference » C++ component reference » Application Engines CALINTERIMAPI » MCalChangeCallBack2 "A client will not be notified of a change if it is the source of the change." regards, pg |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| PC Suite error: (Code: Init IMediaControl2) HELP?! | chunkyspudmonkey | General Discussion | 29 | 2008-06-30 12:47 |
| S60 API Partnering Program | Nokia Ron | News, Announcements and Job Listings | 9 | 2008-04-16 19:28 |
| Calendar API | ticktock | General Symbian C++ | 6 | 2007-05-02 00:36 |
| Calendar API access for older that 3rd edition? | nhammond | General Symbian C++ | 1 | 2007-03-13 14:58 |
| Using the Calendar API Problems 3rdEd, FP1 | mockba | General Symbian C++ | 16 | 2006-12-28 07:12 |