×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Regular Contributor
    Join Date
    Feb 2008
    Posts
    269

    Unhappy Problem with CPbkContactEditorDlg..

    Hi all, i am using CPbkContactEditorDlg in my application.

    It open the dialog box but as i select done entering some values(name,number)it is giving system(-23 )error.

    I am not able to find out the reason, please do help me.

    CODE:
    CPbkContactEngine* pbkContactEng = CPbkContactEngine::NewL( &iCoeEnv->FsSession());

    CleanupStack::PushL( pbkContactEng );
    CCoeEnv *env = CEikonEnv::Static();
    RPbkViewResourceFile pbkRes( *env );
    pbkRes.OpenL();
    CPbkContactItem* aContactItem = pbkContactEng->CreateEmptyContactL();
    CleanupStack::PushL( aContactItem );
    CPbkContactEditorDlg* pbkContactDlg =
    CPbkContactEditorDlg::NewL( *pbkContactEng,*aContactItem,
    ETrue, -1,
    ETrue );
    CleanupStack::PushL( pbkContactDlg );
    pbkContactDlg->SetMopParent( iAvkonAppUi );
    TInt res( KErrNone );
    TRAPD( err, res = pbkContactDlg->ExecuteLD() );
    pbkRes.Close();
    CleanupStack::Pop( pbkContactDlg );
    CleanupStack::PopAndDestroy( 2 ); //aContactItem, pbkContactEng

    system(-23 )error is for "fail to write". But i can't point out where i am doing wrong. I am using the above code. Please help me to solve it.

    Thanks in advance

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: Problem with CPbkContactEditorDlg..

    Did you try what skumar_rao told you earlier: "system(-23 ) says "Failed to write", try debugging on emulator if some thing is wrong."

  3. #3
    Regular Contributor
    Join Date
    Feb 2008
    Posts
    269

    Re: Problem with CPbkContactEditorDlg..

    Hi symbianyucca,

    I tried debugging on the emulator but nothing goes wrong. It open the CPbkContactEditorDlg dialog box when i execute the linebkContactDlg->ExecuteLD();//pbkContactDlg object of
    //CPbkContactEditorDlg
    I can write the name, phone number in the dialog box but as i select done it gives the error.

    Not getting any idea out of it.

    Please help me..

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: Problem with CPbkContactEditorDlg..

    Dunno really what would be the problem, however, maybe you could try adding the contact with contacts API. Example available at the wiki: http://wiki.forum.nokia.com/index.ph...a_Contact_Item

  5. #5
    Regular Contributor
    Join Date
    Feb 2008
    Posts
    269

    Angry Re: Problem with CPbkContactEditorDlg..

    Hi Symbianyucca,

    I used the example you have given in my application for adding new contact, but it gives the same error when it execute the code: contactsDb->AddNewContactL(*contact);
    //CContactDatabase* contactsDb = CContactDatabase::OpenL();

    So, what could be the reason i can't understand.

  6. #6
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: Problem with CPbkContactEditorDlg..

    I have to admit that I'm clueless on that, could you make sure that your executable actually has the capabilites you have said it has. Basically install my Y-Tasks with Processes & threads plug-in, run your app, and check the information on what it says on the process capabilities.

  7. #7
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,687

    Re: Problem with CPbkContactEditorDlg..

    Obviously I have no problems with the various Y-Tools, however a simple
    Code:
    petran -dump s your.exe
    also shows the capabilities.

    (or Lucian would suggest elftran)

  8. #8
    Regular Contributor
    Join Date
    Feb 2008
    Posts
    269

    Smile Re: Problem with CPbkContactEditorDlg..

    Hi Symbianyucca,

    I have solved the problem. I have not added the capability in the mmp file. As i add Readuserdata,writeuserdata, readdevicedata and writedevicedata it works fine in the emulator as well as in the my handset.

    Thanks a lot for help.

Similar Threads

  1. Problem with CAknDoubleStyleListBox with a CAknSearchField
    By jjig in forum Symbian User Interface
    Replies: 2
    Last Post: 2009-09-17, 00:58
  2. CPbkContactEditorDlg problem
    By fathi El3ashery in forum Symbian
    Replies: 5
    Last Post: 2008-03-10, 10:09
  3. Problem with eglSwapBuffers and heap corruption
    By greatape in forum Symbian Media (Closed)
    Replies: 2
    Last Post: 2007-05-24, 03:35
  4. netcards - Problem with opening adapter
    By kernj in forum Symbian Tools & SDKs
    Replies: 5
    Last Post: 2007-01-10, 08:56
  5. Problem: S60 SDK for CW in PC with .NET
    By anttij in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2005-02-28, 11:36

Posting Permissions

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