×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    Regular Contributor
    Join Date
    Aug 2008
    Posts
    54

    try to solve my popup window problem

    hi everybody.i hv already discussed many time regarding this problem.now m tring to explain my problem in more detail.i want to show a popup window when i select inbox in messaging window.for this i hv used the following code..

    void CNewProcess::RunL()
    {
    if(iState==EScheduling)
    {
    TApaTaskList taskList(iWsSession);
    TApaTask task(taskList.FindByPos(0));
    TInt windowId = task.WgId();
    if(windowId == 23)
    {
    CMessagePopup *iMessagePopup = CMessagePopup::NewL();
    CleanupStack::PushL(iMessagePopup);
    iMessagePopup->Show();
    CleanupStack::PopAndDestroy(iMessagePopup);
    }
    iState = ENotScheduling;
    }
    if(iState==ENotScheduling)
    {
    ScheduleL();
    }
    }
    here while debugging i got the windowId of inbox is 23.thus in code i hv checked this id n tried to show popup window.
    to show popup window(which is i tried to display without using GUI coz its called by server like alarm)i refer this link.
    http://discussion.forum.nokia.com/fo...ad.php?t=42223
    and used following code..
    void CMessagePopup::ConstructL()
    {
    iWsSession.Connect();
    //iMyWindowGroup = RWindowGroup( iCoeEnv->WsSession() );
    iMyWindowGroup = RWindowGroup( iWsSession );
    User::LeaveIfError( iMyWindowGroup.Construct( (TUint32)&iMyWindowGroup ) );

    iMyWindowGroup.SetOrdinalPosition( 0, ECoeWinPriorityFep );

    iMyWindowGroup.EnableReceiptOfFocus( EFalse );

    iMyWindowGroup.SetNonFading(ETrue);

    CreateWindowL( &iMyWindowGroup );

    SetRect( DISPLAY_RECT );
    SetFocus(ETrue);
    EnableDragEvents();
    ActivateL();
    }
    //destructor
    CMessagePopup::~CMessagePopup()
    {
    iMyWindowGroup.Close();
    iWsSession.Close();
    }
    void CMessagePopup::Show()
    {
    DrawDeferred();
    }
    void CMessagePopup::Draw(const TRect& /*aRect*/) const
    {
    CWindowGc& gc=SystemGc();

    gc.SetBrushColor(KRgbGray);
    gc.SetBrushStyle(CGraphicsContext::ESolidBrush);
    gc.DrawRect(Rect());
    }


    now there is an error named KERN EXEC 3.which i knw usualy comes for null pointer problem.bt m nt getting any such situation.
    plz help me to remove this KERN ERR 3 problem n to display the popup window

  2. #2
    Registered User
    Join Date
    Dec 2005
    Posts
    1,236

    Re: try to solve my popup window problem

    Hi,

    I have a doubt in the following code

    Code:
    void CNewProcess::RunL()
    {
    if(iState==EScheduling) 
    {
    TApaTaskList taskList(iWsSession);
    TApaTask task(taskList.FindByPos(0));
    TInt windowId = task.WgId();
    if(windowId == 23)
    {
    CMessagePopup *iMessagePopup = CMessagePopup::NewL();
    CleanupStack::PushL(iMessagePopup);
    iMessagePopup->Show();
    CleanupStack::PopAndDestroy(iMessagePopup);
    
    }
    iState = ENotScheduling;
    }
    if(iState==ENotScheduling)
    {
    ScheduleL();
    }
    }
    According to your code you message popup should be drawn immediately after it is created and in show you are calling DrawDeferred the draw is deferrred meaning it would draw at a deferred interval. Now you could try commenting Show() or you could try calling DrawNow() in Show. Then give it a try.
    Regards,
    Sriky

  3. #3
    Regular Contributor
    Join Date
    Aug 2008
    Posts
    54

    Re: try to solve my popup window problem

    i hv used DrawNow() function bt still the problem resides.u hv mensioned u hv some dobt in my code.can u plz explain ur doubt.

  4. #4
    Registered User
    Join Date
    Dec 2005
    Posts
    1,236

    Re: try to solve my popup window problem

    You have clarified my doubt. Let me go through your code once again.
    Regards,
    Sriky

  5. #5
    Registered User
    Join Date
    Nov 2007
    Posts
    444

    Re: try to solve my popup window problem

    Have you put break point and debugged code to find the exact line which causes the KERN EXEC 3?

    Regards,
    Kavit.

  6. #6
    Regular Contributor
    Join Date
    Aug 2008
    Posts
    54

    Re: try to solve my popup window problem

    yes i hv put brk point bt still nt getting tat particular line.m still tring.

  7. #7
    Super Contributor
    Join Date
    Jul 2007
    Posts
    596

    Re: try to solve my popup window problem

    I have not checked ur code but this panic can easily traced through ur callstack. when panic occurs just see ur callstack and then backtrace it will help u to find out the pb.

    Another help will be just enable ur just in time debugging it will help u to get the exact crash location.

    Thanks

  8. #8
    Regular Contributor
    Join Date
    Aug 2008
    Posts
    54

    Re: try to solve my popup window problem

    i got the line where the panic comes.the line is:
    if(windowId == 23)
    {
    CMessagePopup *iMessagePopup = CMessagePopup::NewL();
    CleanupStack::PushL(iMessagePopup);
    .........................
    ...........................
    }
    now plz tell me hw will i fix it?

  9. #9
    Super Contributor
    Join Date
    Jul 2007
    Posts
    596

    Re: try to solve my popup window problem

    just put a break point before that line and check wheather

    iMessagePopup is null after newL is called.

  10. #10
    Regular Contributor
    Join Date
    Aug 2008
    Posts
    54

    Re: try to solve my popup window problem

    hey!i hv checked the value of iMessagePopup.its 0 x cccc so thr must be sum another problem.

  11. #11
    Registered User
    Join Date
    Dec 2005
    Posts
    1,236

    Re: try to solve my popup window problem

    Hi,

    You could make iMessagePopup as your member variable of your class and you could create it at the place you are doing it right now and delete the pointer in the destructor. Let us know the outcome.
    Regards,
    Sriky

  12. #12
    Super Contributor
    Join Date
    Jul 2007
    Posts
    596

    Re: try to solve my popup window problem

    Quote Originally Posted by pamelag View Post
    hey!i hv checked the value of iMessagePopup.its 0 x cccc so thr must be sum another problem.
    That is the null pointer u r getting.

    debug ur constructL code. there is some pb.

    thanks

  13. #13
    Regular Contributor
    Join Date
    Aug 2008
    Posts
    54

    Re: try to solve my popup window problem

    ok thanx for awaring me.m tring n let u knw

  14. #14
    Regular Contributor
    Join Date
    Aug 2008
    Posts
    54

    Re: try to solve my popup window problem

    i hv done the same wat sriky27 hv told me to do.yes the iMessagePopup having null value 0x00000.nw hw will i remove this null value

  15. #15
    Super Contributor
    Join Date
    Jul 2007
    Posts
    596

    Re: try to solve my popup window problem

    where is ur newLC().(if u have followed twophase construction it should be there). I guess from newlc u have called ur constructL.

    if i am right then debug code line by line with sequence newl->newLC->COnstructL. and find out the exact line.

    Thanks

Similar Threads

  1. Window always at front and icon transparency problem
    By VilluNikolaiV in forum Symbian User Interface
    Replies: 4
    Last Post: 2008-09-23, 04:38
  2. How can I solve this problem?
    By hydlx in forum Symbian Tools & SDKs
    Replies: 0
    Last Post: 2006-08-02, 07:24
  3. Please help me solve a problem in CTelephony
    By hoy_cpe in forum Symbian
    Replies: 0
    Last Post: 2006-07-27, 05:15
  4. A reward of $40 to solve backlight problem
    By edcruise in forum Symbian
    Replies: 2
    Last Post: 2006-06-30, 22:42
  5. Floating Window problem
    By lauyk001 in forum Symbian
    Replies: 2
    Last Post: 2004-11-29, 05:08

Posting Permissions

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