×

Discussion Board

Results 1 to 11 of 11
  1. #1
    Regular Contributor
    Join Date
    Jan 2009
    Location
    Dhaka,Bangladesh
    Posts
    146

    How to restore battery and network signal?

    Hi,
    the problem of my application is when i click on my application the
    both 2 signal are disappear.But if i change the shape of simulator the both signal are come into the same place(status panel).I saw my application in my mobile also.
    when rotate the screen the signal are back.But at the first time the both signal are gone.
    Is there any solution of this type problem?

    Thanks in advance.

    ---Auni

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

    Re: How to restore battery and network signal?

    Are you swithing the Status panel type somwhere ?
    Also are you using ApplicationRect, instead of Client reactange on setting your containers rect on the screen ?

  3. #3
    Regular Contributor
    Join Date
    Jan 2009
    Location
    Dhaka,Bangladesh
    Posts
    146

    Re: How to restore battery and network signal?

    Thanks yucca for reply and sorry to reply late.

    I have a class ToDoAppUI which call a view iCalender and iCalender view call
    its container.In container the draw function is:
    void CToDoCatListContainer::Draw(const TRect& aRect) const
    {
    CWindowGc& gc = SystemGc();
    //gc.Clear(aRect);
    gc.Clear(Rect());
    return;
    }
    So which part that i need to change or modifyu or add?

    thanks in advance.

    --Auni

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

    Re: How to restore battery and network signal?

    Actually you should look into SetRect function calls, and see what rectanges are they using.

  5. #5
    Regular Contributor
    Join Date
    Jan 2009
    Location
    Dhaka,Bangladesh
    Posts
    146

    Re: How to restore battery and network signal?

    Thanks yucca for reply.

    I call this function in
    void CToDoCategoryListView::HandleStatusPaneSizeChange()
    {
    iContainer->SetRect(ClientRect() );

    }
    I think thats y the signal is restored while screen size changed.
    But how could i restore the signal at the first?

    Thanks in advance.

  6. #6
    Super Contributor
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034

    Re: How to restore battery and network signal?

    Have you passed clientrect at time of creating container???
    iContainer->ConstructL(ClientRect());

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

    Re: How to restore battery and network signal?

    Yep, basically see what you do with the SetRect inside your container's ConstructL function.

  8. #8
    Regular Contributor
    Join Date
    Jan 2009
    Location
    Dhaka,Bangladesh
    Posts
    146

    Re: How to restore battery and network signal?

    Thanks yucca for reply.

    from view i called

    iContainer= CToDoCategoryListView::NewL(ClientRect() );

    void CToDoCategoryListView::NewL(const TRect& aRect)
    {
    CStatusPaneAppView* self = CStatusPaneAppView::NewLC(aRect);
    CleanupStack::Pop(self);
    return self;
    }

    void CToDoCategoryListView::NewLC(const TRect& aRect)
    {
    CStatusPaneAppView* self = new ( ELeave ) CStatusPaneAppView;
    CleanupStack::PushL(self);
    self->ConstructL(aRect);
    return self;
    }
    void CToDoCategoryListView::ConstructL(const TRect& aRect)
    {
    // Create a window for this application view
    CreateWindowL();

    // Set the windows size
    SetRect(aRect);

    // Activate the window, which makes it ready to be drawn
    ActivateL();
    }

    This way i write my application.Where i have done wrong?

    Thanks in advance.

    --Auni

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

    Re: How to restore battery and network signal?

    hmmm, maybe you could try actually making a CToDoCategoryListView instance, you are actually making a CStatusPaneAppView, so check that the code lines inside your NewL & NewLC functions.

  10. #10
    Regular Contributor
    Join Date
    Jan 2009
    Location
    Dhaka,Bangladesh
    Posts
    146

    Re: How to restore battery and network signal?

    Extremely Sorry yucca for wrong code.The actual code is written below:

    Thanks yucca for reply.

    from view i called

    iContainer= CToDoCategoryListView::NewL(ClientRect() );

    void CToDoCategoryListView::NewL(const TRect& aRect)
    {
    CToDoCategoryListView* self = CToDoCategoryListView::NewLC(aRect);
    CleanupStack::Pop(self);
    return self;
    }

    void CToDoCategoryListView::NewLC(const TRect& aRect)
    {
    CToDoCategoryListView* self = new ( ELeave ) CToDoCategoryListView;
    CleanupStack::PushL(self);
    self->ConstructL(aRect);
    return self;
    }
    void CToDoCategoryListView::ConstructL(const TRect& aRect)
    {
    // Create a window for this application view
    CreateWindowL();

    // Set the windows size
    SetRect(aRect);

    // Activate the window, which makes it ready to be drawn
    ActivateL();
    }

    This way i write my application.Where i have done wrong?

    Thanks in advance.

    --Auni

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

    Re: How to restore battery and network signal?

    That looks ok to me at least.. Maybe you could try debugging the ClientRect() values, so that they are not having iTl as (0,0), but the .iY should be something positive.

Similar Threads

  1. Network config differences S40 / S60
    By ipxlittle in forum Mobile Java Networking & Messaging & Security
    Replies: 3
    Last Post: 2008-01-15, 22:38
  2. battery level and Network strength using j2me
    By renjithptvm in forum Mobile Java General
    Replies: 1
    Last Post: 2006-10-27, 19:00
  3. battery level and Network strength
    By renjithptvm in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2005-06-08, 06:55
  4. battery level and Network strength
    By renjithptvm in forum Mobile Java Media (Graphics & Sounds)
    Replies: 0
    Last Post: 2005-06-08, 06:43
  5. Reading battery Strength, Network Strength etc ..
    By amitaggarwal in forum Symbian
    Replies: 17
    Last Post: 2005-04-20, 11:35

Posting Permissions

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