×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Oct 2010
    Posts
    4

    Can't get Anniversary from contacts list

    Hi,
    i try to get the anniversary dates from contacts of my contacts list. Therefore i get a list of all contacts and check for the anniversary property.

    Code:
    		var contact = new Service("Service.Contact", "IDataSource");
    		var inParams = {Type:"Contact"};
    		var outParams = contact.GetList(inParams);
    		if (outParams.ErrorCode == 0) {
    		    var outList = outParams.ReturnValue;
    		    var outputEntry = null;
                        do {
    				outputEntry = outList.next();
    			        if (null != outputEntry) {
    			            var firstname:String = outputEntry.FirstName["Value"];
    			            var lastname:String = outputEntry.LastName["Value"];
    			             
    			            if (outputEntry["Anniversary"] != undefined
    			            && outputEntry["Anniversary"] != null )
    			            {
    					           var b:Date = new Date(outputEntry.Anniversary["Value"]);
    				        	   ...
    			            }
    			        } else {
    			            break;
    			        }
    			} while (true);
    		} else {
    		    var errorId = outParams.ErrorCode;
    		}
    But my app crash if i try to access the anniversary value
    Code:
    outputEntry.Anniversary["Value"]
    . I checked the properties of the anniversary object and it contains only a field
    Code:
    _mapID
    and no field "Value" like the API documentation describes.

    Can anyone help me to get the date value...


    tia
    atiwoh

  2. #2
    Registered User
    Join Date
    Oct 2010
    Posts
    4

    Re: Can't get Anniversary from contacts list

    It seems that it depends on the size of the list what happens if i access anniversary value. If i have many contacts (> 10) with saved anniversary dates the access to the value of the property result in an application crash! If i have only a few entries with anniversary dates so all works fine....

    Can it be that the memory is the limiting factor? Overall my app size is only 89 kb and my contacts list isn't really big (<70)....

  3. #3
    Registered User
    Join Date
    Oct 2010
    Posts
    4

    Re: Can't get Anniversary from contacts list

    It seems there is a bug in the flash lite api! If i have more than one contact with a saved anniversary date i can't read the value, the application always crash! I can read the "Label" but not the "Value".

    Can anyone (maybe from nokia) validate this?

    Code:
    		var a:Date;
    		var inParams = {Type:"Contact"};
    		var contact = new Service("Service.Contact", "IDataSource");
    		var outParams = contact.GetList(inParams);
    		var outputEntry;
    		_root.createTextField("contentTF", _root.getNextHighestDepth(),0,50,360,474);
    		_root.contentTF.text = "Contacts: \n";
    		
    		while ((outputEntry = outParams.ReturnValue.next()) != null) {
    			
    			var l:String = new String();
    			l += outputEntry.FirstName["Value"] + " / ";
    			
    			if (outputEntry.Anniversary != undefined) {
    				l += outputEntry.Anniversary.Label + " / ";
    				a = outputEntry.Anniversary.Value;
    				l += a.getUTCMonth() + "." + a.getUTCDate() + "." + a.getUTCFullYear();
    			}
    			
    			_root.contentTF.text += l + "\n";
    			l = null;
    		}
    tia

Similar Threads

  1. Using list box to display Contacts from Contacts database
    By chaithrakumar in forum Symbian User Interface
    Replies: 10
    Last Post: 2009-09-18, 08:52
  2. Wants to add multiple contacts in to Handset Contacts list
    By harshalpatil in forum Mobile Java General
    Replies: 3
    Last Post: 2008-12-18, 13:07
  3. How to get list of contacts programmatically
    By skvladimir in forum PC Suite API and PC Connectivity SDK
    Replies: 0
    Last Post: 2008-07-28, 09:12
  4. Anniversary Sound
    By anoopd in forum Symbian
    Replies: 7
    Last Post: 2007-05-04, 08:36
  5. vCalendar and anniversary
    By richard_slade_1 in forum General Messaging
    Replies: 1
    Last Post: 2003-12-03, 10:52

Posting Permissions

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