Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User thomasraku's Avatar
    Join Date
    Feb 2006
    Posts
    24
    I am trying to create an application which adds a contact to the contact database.But before adding the user should be able to edit the values in the different fields. So i used the contact editor dialog.but while creating the dialog using NewL a CONE14 error occurs i.e Environment cannot find the specified resource in any resource file The code used is as shown .



    Code:
    void CSendSMSView::HandleCommandL(TInt aCommand)
        {   
        switch ( aCommand )
            {
               ..
               ..
    case ESendSMSCmdAddContact: 
      {
           _LIT(KFname,"Rakesh");
           _LIT(KCompany,"Microsoft");
           _LIT(KMobNo,"9886897435");
    	
    CPbkContactEngine* iContactEngine = CPbkContactEngine::NewL(NULL);
    
    CleanupStack::PushL(iContactEngine);
    				
    CPbkContactItem* newItem = iContactEngine->CreateEmptyContactL();
    CleanupStack::PushL(newItem);
    UpdateFieldL(newItem,EPbkFieldIdPhoneNumberMobile,KMobNo);
    UpdateFieldL( newItem, EPbkFieldIdFirstName,KFname);
    UpdateFieldL(newItem,EPbkFieldIdCompanyName,KCompany); 
    				
    //TContactItemId contactId;
    //contactId = iContactEngine->AddNewContactL(*newItem);
    
    			
    CPbkContactEditorDlg* contactEditorDlg = CPbkContactEditorDlg::NewL(*iContactEngine,*newItem,ETrue);
    				CleanupStack::PushL(contactEditorDlg);
    	contactEditorDlg->ExecuteLD();
    	CleanupStack::Pop(contactEditorDlg);
    	CleanupStack::PopAndDestroy(newItem);
    	CleanupStack::PopAndDestroy(iContactEngine);
    	break;
    			
    }
    I was succesful in adding the contact if i uncomment the commented lines but i require an editor(UI).
    Is there any other editor to do this ?
    Expecting some help on this

    Regards
    Rakesh

  2. #2
    Registered User thomasraku's Avatar
    Join Date
    Feb 2006
    Posts
    24
    i have solved the above problem .For anyone who needs it later i am adding the solution.

    There is a 'RPbkViewResourceFile' which should be used to load the resource dll , before we can use the editordlg.The dll can be loaded using OpenL() function in this class

    Regards,
    Rakesh

  3. #3
    Registered User bm's Avatar
    Join Date
    Sep 2006
    Posts
    35
    Yes i am facing capability prob... can u give me any idea how i can solve capability prob.
    ABC

  4. #4
    Registered User gybrown's Avatar
    Join Date
    Aug 2006
    Posts
    10
    Here is an alternative solution that worked for me:

    #ifdef __SERIES60_30__
    resourceFileName = _L("z:\\resource\\pbkview.rsc");
    #else
    resourceFileName = _L("z:\\system\\data\\pbkview.rsc");
    #endif
    BaflUtils::NearestLanguageFile(CEikonEnv::Static()->FsSession(), resourceFileName);
    iPBkResourceFileId = CEikonEnv::Static()->AddResourceFileL(resourceFileName);

  5. #5
    Registered User jerrytian's Avatar
    Join Date
    Mar 2005
    Posts
    29
    Thank god I found this post. The "CONE 14" panic just bugged me for hours.

    I think the document should be more accurate, or just need a update?

    Just in case someone else later need it, maybe myself. :-)

    RPbkViewResourceFile rpbkViewRscFile(*CEikonEnv::Static());
    rpbkViewRscFile.OpenL();

    CPbkContactEngine *pbkContactEngine = CPbkContactEngine::NewL();
    CPbkContactItem *pbkContactItem = pbkContactEngine->CreateEmptyContactL();

    CPbkContactEditorDlg *pbkEditor = CPbkContactEditorDlg::NewL(*pbkContactEngine, *pbkContactItem, true, 0);
    pbkEditor->HideExitCommand();
    pbkEditor->ExecuteLD();

    delete pbkContactItem;
    delete pbkContactEngine;

  6. #6
    Nokia Developer Expert symbianyucca's Avatar
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    28,712
    in th future please do not include any religious remarks in your posts, they usually do not have anything to do with software development, and that is the thing we are discussing in here.

Similar Threads

  1. OpenGL ES on S60 3rd Edition SDK Emulator
    By specjones in forum Symbian Tools & SDKs
    Replies: 7
    Last Post: 2008-09-30, 10:22
  2. Replies: 2
    Last Post: 2007-03-06, 16:33
  3. User::Alloc() alternative on S60 3rd beta?
    By iulian_moldovan in forum Symbian C++
    Replies: 10
    Last Post: 2006-04-17, 02:10
  4. TTime : TInt64& Int64() problem in S60 3rd edition
    By iulian_moldovan in forum Symbian Tools & SDKs
    Replies: 3
    Last Post: 2006-01-24, 13:07
  5. OpenGL ES Support in S60 3rd Edition Beta SDK
    By choefele in forum Symbian Media (Closed)
    Replies: 2
    Last Post: 2005-12-14, 06:01

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved