×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Regular Contributor
    Join Date
    Mar 2010
    Posts
    78

    Post Add Anniversary in calendar

    Hi,

    I am doing a add Anniversary application in which when i enter the details in the fields,it shows a updated information,but finally after that am getting a "PIMException with a message showing item is removed"..

    Can anyone plz help me.

    Thanks in advance
    Anamika

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,087

    Re: Add Anniversary in calendar

    You are trying it on which device, did you sign your application.
    Whats happens when you try this on WTK emulator?

    thanks,
    ~Amitabh

  3. #3
    Regular Contributor
    Join Date
    Mar 2010
    Posts
    78

    Post Re: Add Anniversary in calendar

    Quote Originally Posted by im2amit View Post
    You are trying it on which device, did you sign your application.
    Whats happens when you try this on WTK emulator?

    thanks,
    ~Amitabh
    I am trying it on s60 device.

  4. #4
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,087

    Re: Add Anniversary in calendar

    What happens on WTK emulator and what happens on your S60 device when you run PDAPDemo PIM example for WTK on it.

    thanks,
    ~Amitabh

  5. #5
    Regular Contributor
    Join Date
    Mar 2010
    Posts
    78

    Post Re: Add Anniversary in calendar

    here am using a s60 device....finally when i add the details those details are not getting added nd instead it shows a PIM Exception with a message showing that the item is removed..

    have pasted my code below.

    Can u plz help me.

    Code:
      private void addAnniversary() {
            try {
                PIM pim             = PIM.getInstance();
                String listitem[]   = pim.listPIMLists(PIM.EVENT_LIST) ;
                for(int i=0;i < listitem.length ;i++) {
                    System.out.println("Calender Types:"+listitem[i]);
                }
                EventList eventList = (EventList)pim.openPIMList(PIM.EVENT_LIST, PIM.READ_WRITE,listitem[2]);
                Event event         = eventList.createEvent();
                if(eventList.isSupportedField(Event.SUMMARY) == true) {
                    String summary  = summaryField.getString();
                    event.addString(Event.SUMMARY, PIMItem.ATTR_NONE, summary);
                } else {
                    // At least summary must be supported.
                    eventList.close();
                    throw new Exception("Summary field for event is not supported");
                }
                Date dt = new Date();
                if(eventList.isSupportedField(Event.START) == true) {
                    long startDate = dt.getTime();
                    event.addDate(Event.START, PIMItem.ATTR_NONE, startDate);
                }
                 // Commit event.
                event.commit();
                // Close list of events.
                eventList.close();
                // Notify user that event was added
                showAlert("Info", "Event was successfully added.");
            } catch(PIMException pimExc) {
                // TODO: Handle error on working with PIM.
                showAlert("PIMExceptionnnn", pimExc.getMessage());
            } catch(SecurityException secExc) {
                // TODO: Handle error on access to PIM.
                showAlert("SecurityExceptionmmmm", secExc.getMessage());
            } catch(Exception exc) {
                // TODO: Handle all other errors.
                showAlert("Exceptionqq", exc.getMessage());
            }
        }


    thnks in advance

  6. #6
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,087

    Re: Add Anniversary in calendar

    EventList eventList = (EventList)pim.openPIMList(PIM.EVENT_LIST, PIM.READ_WRITE,listitem[2]);
    Why are you using listitem[2] here, try with listitem[0] or [1]... 2 stands for ?

    thanks,
    ~Amitabh

  7. #7
    Regular Contributor
    Join Date
    Mar 2010
    Posts
    78

    Post Re: Add Anniversary in calendar

    Quote Originally Posted by im2amit View Post
    Why are you using listitem[2] here, try with listitem[0] or [1]... 2 stands for ?

    thanks,
    ~Amitabh
    0 stands for meeting,1 stands for entries and 2 stands for anniversery....the application which am dng right now is anniversary and thats the reason i have used listitem[2] in my code.

  8. #8
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,087

    Re: Add Anniversary in calendar

    In that case the code should work, try on s60 emulator and see. Hope you are not trying to put any special character or non english caharacters in the Summary field. Try changing the date also.

    thanks,
    ~Amitabh
    Last edited by im2amit; 2010-04-29 at 08:11.

  9. #9
    Regular Contributor
    Join Date
    Mar 2010
    Posts
    78

    Post Re: Add Anniversary in calendar

    Quote Originally Posted by im2amit View Post
    In that case the code should work, try on s60 emulator and see. Hope you are trying to put any special character or non english caharacters in the Summary field. Try changing the date also.

    thanks,
    ~Amitabh
    Thanks for ur reply.

  10. #10
    Registered User
    Join Date
    Dec 2010
    Posts
    11

    Re: Add Anniversary in calendar

    Do u know how to get Anniversary from the calendar to a text file....

Similar Threads

  1. Replies: 12
    Last Post: 2009-02-23, 10:59
  2. Extending Calendar Anniversary Features
    By vinaykk in forum Symbian
    Replies: 2
    Last Post: 2008-05-21, 10:18
  3. Calendar event Add
    By sunithadevim in forum Symbian
    Replies: 1
    Last Post: 2008-01-31, 17:23
  4. calendar pim
    By b0ssY in forum Symbian
    Replies: 0
    Last Post: 2007-06-07, 07:15
  5. Problem in Deleting all the calendar entries?
    By symnewbie in forum Symbian
    Replies: 0
    Last Post: 2005-06-17, 14:19

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×