×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Aug 2010
    Posts
    347

    A question about RWindow intialization and usage (Panic WSERV 9)

    Hello list,

    when I run my app, I get a Panic WSERV 9 from the emulator. I debugged this to find out that as the documentation for this panic says, I had not activated the graphics context before usage.

    In my code, I use
    CWndowGc& gc = SystemGc();
    to create a graphics context.
    Now, to activate this context, I have defined an RDrawableWindow object reference:
    RDrawableWindow& W = RWindow();
    Now I need to set the size of the RWindow using W.SetSize(), but before doing so, I need to construct the window object using the Construct() method and this is where I have my doubt.
    I need to pass a const reference to a RWindowTreeNode object as the parent object of this window. Conceptually, as per my understanding, the window should be owned and parented by the view. But I am not able to draw an association between the view object derived from CCoeControl and the RWindow object, as they belong to two non-related bases.

    How can I resolve this issue?

    TiA for your suggestions
    Vin

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

    Re: A question about RWindow intialization and usage (Panic WSERV 9)

    What excatly are you trying to do and in which context (is it GUI app or something else) ?

    Basically SystemGc id defined for CCoeControl, and used in Draw function, which is called by application framework after the context is activated, and you most often do not need to mix RWindows atuff with GUI apps using application framework.

  3. #3
    Regular Contributor
    Join Date
    Aug 2010
    Posts
    347

    Re: A question about RWindow intialization and usage (Panic WSERV 9)

    Quote Originally Posted by symbianyucca View Post
    What excatly are you trying to do and in which context (is it GUI app or something else) ?

    Basically SystemGc id defined for CCoeControl, and used in Draw function, which is called by application framework after the context is activated, and you most often do not need to mix RWindows atuff with GUI apps using application framework.
    My app is a GUI app. I am trying to draw an image on the window. And I presume I need to follow these steps to do so:

    1. create a graphics context for my app
    2. activate the context
    3. draw using the context

    I am at step 2, where in I need to pass the reference of an object of type RDrawableWindow to activate the graphics context.

    thanks
    Vin

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

    Re: A question about RWindow intialization and usage (Panic WSERV 9)

    No you don't need to do. Basically just in your class derived from a CCoeContainer, you just construct and load the image in its ConstructL function. and then you just call DrawNow(), which will cause Draw() function to be called.

    Then while in Draw() function, just use the CWndowGc& gc = SystemGc(); to get already active gc and use its functions for drawing.

Similar Threads

  1. WSERV 8 PANIC
    By raj8nokiaforum in forum Symbian
    Replies: 13
    Last Post: 2011-08-17, 14:14
  2. WSERV 3 panic
    By vineet.jain in forum Symbian User Interface
    Replies: 8
    Last Post: 2011-05-05, 12:35
  3. Panic WSERV 7
    By arungupta_2jan in forum Symbian
    Replies: 4
    Last Post: 2009-09-17, 11:30
  4. Error: Panic WSERV 7
    By Daaku in forum Symbian User Interface
    Replies: 9
    Last Post: 2009-07-08, 14:56
  5. Panic WSERV 9
    By Vignesh.M in forum Symbian User Interface
    Replies: 13
    Last Post: 2008-12-10, 12:42

Posting Permissions

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