×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Aug 2006
    Location
    Istanbul - Turkiye
    Posts
    37

    can't make global arrays as the same object

    hi all,
    i use array (TDesCArray* titleList) in a view..
    When i go back this view from another view, the titleList is empty of course ,
    because the code titleList = new (ELeave) CDesCArrayFlat(5); is called again..

    It must be the same object , the same instance in all app.
    can you help me??
    any suggestions?

    thanks all....

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

    Re: can't make global arrays as the same object

    just move the "titleList = new (ELeave) CDesCArrayFlat(5)" out from the view activation function and put it into the ConstructL function, then it should only be called when you construct this view and not when you activate it.

    Or, if you wish, move it to your appui class and implement public function which with your views can access it.

    yucca

  3. #3
    Registered User
    Join Date
    Aug 2006
    Location
    Istanbul - Turkiye
    Posts
    37

    Re: can't make global arrays as the same object

    very very thanks yucca..
    the code is in constructL at present.
    when activating the constructL is called..
    pls look at my doActivateL and suggest me...
    here is :
    ////////
    void CMultiViewsView4:oActivateL( const TVwsViewId& /*aPrevViewId*/,
    TUid /*aCustomMessageId*/,
    const TDesC8& aCustomMessage )
    {
    TBuf<1000> data;
    data.Copy(aCustomMessage);
    iContainer = CMultiViewsContainer4::NewL( ClientRect(), data );
    AppUi()->AddToStackL(*this, iContainer);

    }
    ////////////////////

    thanks ....

Similar Threads

  1. How to build GCCE target
    By dsiorpaes in forum Symbian Tools & SDKs
    Replies: 5
    Last Post: 2008-09-18, 06:54
  2. problem in CActive Object... in make a dial...
    By marycore in forum Symbian
    Replies: 1
    Last Post: 2006-09-12, 09:50
  3. Display global text object in upright style
    By dingdan in forum Symbian User Interface
    Replies: 2
    Last Post: 2004-08-12, 17:09
  4. How can to make global or static data ?
    By comb in forum Symbian
    Replies: 2
    Last Post: 2003-08-11, 18:19
  5. abld make files missing
    By dalore in forum Symbian
    Replies: 0
    Last Post: 2003-06-13, 12:40

Posting Permissions

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