Discussion Board

Results 1 to 7 of 7
  1. #1
    Regular Contributor Tanya's Avatar
    Join Date
    Nov 2006
    Location
    Rajkot
    Posts
    430
    Hi

    i like to pass whole array data Appui to DBMSEngine through make function
    please give me suggetion

    if String data like to pass than we use
    const TDesC& CXMLParsingAppUi::Name()
    {
    return iName; // TBuf<15> iName, declaration in header file;
    }

    but what can i write if using array???

    Regards
    Tanya

  2. #2
    Registered User kis_spn's Avatar
    Join Date
    Feb 2007
    Location
    India
    Posts
    1,128
    Hi In the case of array....

    CDesC16Array* CXMLParsingAppUi::Name()
    {
    iArrDesName=new(ELeave)CDesC16Array(5);
    ///////
    /// Use here.....

    return iArrDesName; // return here array....
    }

    I think, It would work for u.

  3. #3
    Nokia Developer Champion kkrish's Avatar
    Join Date
    Jun 2006
    Location
    India
    Posts
    3,029
    you can also declare array in the appui as public and can access bu static cast.

    CDesCArrayFlat* iDataName;//public in appui.h
    iDataName = new (ELeave) CDesCArrayFlat(1);//constructL in appui.cpp

    if(iDataType)//in distructor in appui
    {
    delete iDataType;
    iDataType = NULL;
    }


    //access like this anywhere and you did not need to return any value from the function.

    ((AppUi*)(CCoeEnv::Static()->AppUi()))->iDataName

  4. #4
    Regular Contributor Tanya's Avatar
    Join Date
    Nov 2006
    Location
    Rajkot
    Posts
    430
    it's give me an error like: 'AppUi' : undeclared identifier

    i write code following way:

    CXMLParsingAppUi.h
    --------------------
    public:
    CDesCArrayFlat* iarrName;

    CXMLParsingAppUi.cpp
    --------------------
    iarrName = new (ELeave) CDesCArrayFlat(1);
    iarrName->AppendL( *colname );

    DBMSEngine.cpp
    ---------------
    void CBookDb::CreateBooksTableL()
    {
    ((AppUi*)(CCoeEnv::Static()->AppUi()))->iarrName;
    ....
    ....
    ....
    }

  5. #5
    Nokia Developer Champion kkrish's Avatar
    Join Date
    Jun 2006
    Location
    India
    Posts
    3,029
    write this
    ((CXMLParsingAppUi*)(CCoeEnv::Static()->AppUi()))->iarrName; instead of

    ((AppUi*)(CCoeEnv::Static()->AppUi()))->iarrName;

    hope this will work now.

    for testing purpose you can take TBuf<20> iarrName onstead of CDesCArrayFlat* iarrName;

    hope this will help you.

  6. #6
    Regular Contributor Tanya's Avatar
    Join Date
    Nov 2006
    Location
    Rajkot
    Posts
    430
    ya i use same way and also include header file
    #include <coemain.h>

    but give me a same error.

  7. #7
    Nokia Developer Champion kkrish's Avatar
    Join Date
    Jun 2006
    Location
    India
    Posts
    3,029
    did you include XMLParsingAppUi.h

    hope this will fine now.

Similar Threads

  1. copying descriptor data into descriptor array
    By bballbeng in forum Symbian C++
    Replies: 4
    Last Post: 2006-09-07, 10:21
  2. GPRS connection problems on 6600..
    By suckho in forum Symbian Networking & Messaging (Closed)
    Replies: 10
    Last Post: 2005-12-02, 14:00
  3. Nokia 6600 Socket Server send delay Problem
    By dicson_hu in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2005-10-31, 07:37
  4. how to INSERT data in an ARRAY in ARBITRARY order??
    By windalfred0 in forum Symbian
    Replies: 1
    Last Post: 2004-05-11, 06:20
  5. Class and function to open an APN
    By pappago in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2002-10-21, 09:14

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved