×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jan 2007
    Posts
    18

    A stranger problem in CActive Object

    First,in the method TimerExpired(),I write following codes:
    // Timer control, called everytime the time times out
    void CMMBoxProgressControl::TimerExpired()
    {
    iAnimationFrame++;
    iTempCount++;
    if (iAnimationFrame>=100)
    {
    iAnimationFrame = 0;
    }
    TBuf<24> iTempBuf;
    iTempBuf.AppendNum(iAnimationFrame);

    CWindowGc& gc=SystemGc();
    gc.Activate(*DrawableWindow());
    gc.Deactivate();


    iTimer->After((TTimeIntervalMicroSeconds32)200000);
    }

    And then this method is called in a CActive periodically.
    but every time the frist called by CActive is well, after the first called.the application is crash.

    if i use the following codes instead of the above codes using red font. the application is well.

    CAknConfirmationNote* iConfirmNote = new (ELeave)CAknConfirmationNote;
    iConfirmNote->ExecuteLD(iTempBuf);

    who can help me ,thanks in advanced!

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

    Re: A stranger problem in CActive Object

    just call DrawNow() and let the system handle the drawing into the screen by calling Draw().

Similar Threads

  1. Passing the object problem
    By hemrajn in forum Symbian
    Replies: 5
    Last Post: 2007-11-02, 11:33
  2. CActive object destructor not called
    By marmirman in forum Symbian
    Replies: 6
    Last Post: 2007-10-29, 06:51
  3. object accessing problem
    By rajesh1410 in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2007-03-16, 10:40
  4. Active Object problem
    By xhsoldier in forum Symbian
    Replies: 6
    Last Post: 2006-07-27, 21:35
  5. Waiting for a CActive object to finish
    By yaront in forum Symbian Tools & SDKs
    Replies: 4
    Last Post: 2004-12-29, 12:34

Posting Permissions

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