Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor joteddy123's Avatar
    Join Date
    Feb 2009
    Posts
    53
    we are making a expense calculator.We have a function which checks whether the expense exceeds the budget which is set in advance.But we realised that the function BudgetNote wont get executed while debugging.The debugger ignores the function call or the emulator crashes right in the beginning.

    void CExpListBox::AddExpenseL()
    /*this function is used to add a new expense to the database*/
    {
    BudgetNote();//to check whether the expense exceeds the budget
    CExpForm* form= CExpForm::NewL(NULL);
    form->PrepareLC(R_EXP_FORM_EXP_FORM);
    form->SetAddFlag();
    form->RunLD();
    LoadExpListL();
    }
    void CExpListBox::BudgetNote()
    {

    CexpDatabase* expDb = CexpDatabase::NewL();
    CexpbDatabase* expbDb = CexpbDatabase::NewL();
    CexpListBoxView* list;
    TexpbTableItem iexpbTableItem;
    TexpbTableItem Bnew;
    TInt count = 0;
    TBuf<32> buf,buf1,buf2;
    TBufC<32> msg, msg2;
    TInt amt=0;
    TexpTableItem iexpTableItem;
    RArray<TexpTableItem> aexpTableItemArray;
    msg = _L("Expense exceeds budget");
    CleanupStack::PushL(expDb);
    expDb->GetexpTableCountL(count);

    if(count==0)
    {
    CleanupStack::PopAndDestroy();
    return;
    }

    TBool first = expDb->GetexpTableFirstRecordL(iexpTableItem);
    buf1=iexpTableItem.iexpAmt;
    amt=amt+TInt(buf1);
    TBool next = EFalse;
    TBuf<32> aBuffer;
    if(first)
    {
    do
    {
    next = expDb->GetexpTableNextRecordL(iexpTableItem);
    buf2=iexpTableItem.iexpAmt;
    amt=amt+TInt(buf2);
    }
    while(next);
    CleanupStack::PopAndDestroy(expDb);
    CleanupStack::PushL(expbDb);
    Bnew= expbDb->GetexpbTableLastRecordL(iexpbTableItem);
    buf=Bnew.iexpbBgt;
    if(amt>=TInt(buf))
    {
    list->RunNote2L(&msg);
    }

    CleanupStack::PopAndDestroy(expbDb);
    }
    else
    {
    CleanupStack::PopAndDestroy(expbDb);
    CleanupStack::PopAndDestroy(expDb);
    }

    }

  2. #2
    Nokia Developer Champion savaj's Avatar
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034
    What is the panic code, if your application goes crashed???

    Enable just in time debugger and find panic code.

    http://wiki.forum.nokia.com/index.ph...ded_panic_code

Similar Threads

  1. ShortMsgReceived - Delphi
    By qb_soft in forum PC Suite API and PC Connectivity SDK
    Replies: 9
    Last Post: 2008-06-22, 10:30
  2. Help with lnk2019 lnk1120 error
    By yuenfatt in forum Symbian C++
    Replies: 8
    Last Post: 2007-08-24, 08:21
  3. EXecute function in RDbStoreDatabase
    By symbians60 in forum Symbian C++
    Replies: 4
    Last Post: 2007-01-23, 10:59
  4. C-code..unable to make sis
    By Symbian_Neil in forum Symbian C++
    Replies: 9
    Last Post: 2006-12-02, 07:55
  5. Problem with Nokia D211 Linux Drivers
    By fiveam in forum Multimodecards
    Replies: 1
    Last Post: 1970-01-01, 02:00

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