×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    May 2004
    Location
    Singapore
    Posts
    112

    "'iCoeEnv' : undeclared identifier"

    I get this weird error as my line doesn't has this variable, please help!

    ///////////////////////////////////////////////////////////////////////////////////
    void CSMSRouterData::SaveDetails()
    {
    iDetailsList->StoreSettingsL();
    CSMSRouterDocument* doc = static_cast<CSMSRouterDocument*>(iEikonEnv->EikAppUi()->Document()); //It show this line got this error

    CRoute* newRoute;

    if(doc->IsNewRoute())
    {
    // create a new entry
    newRoute = CRoute::NewLC();
    }
    else
    {
    // access the current entry
    newRoute = &doc->Route(doc->Index());
    }

    // set new fields
    newRoute->SetStatus(iListRoute->iStatus);
    newRoute->SetPassword(iListRoute->iPassword);
    newRoute->SetDesignateNum(iListRoute->iDesignateNum);
    newRoute->SetTime(iListRoute->iScheduler);

    if(doc->IsNewRoute())
    {
    doc->AddRouteL(newRoute);
    CleanupStack::Pop(newRoute);
    }
    else
    {
    doc->ChangeRouteL(newRoute);
    }

    }

    ///////////////////////////////////////////////////////////////////////////////////
    Error State

    C:\SYMBIAN\6.1\SERIES60\EPOC32EX\SMSROUTER\SRC\Smsrouterdata.cpp(58) : error C2065: 'iCoeEnv' : undeclared identifier
    C:\SYMBIAN\6.1\SERIES60\EPOC32EX\SMSROUTER\SRC\Smsrouterdata.cpp(58) : error C2440: 'static_cast' : cannot convert from 'int' to 'class CEikonEnv *'
    Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
    C:\SYMBIAN\6.1\SERIES60\EPOC32EX\SMSROUTER\SRC\Smsrouterdata.cpp(58) : error C2227: left of '->EikAppUi' must point to class/struct/union
    C:\SYMBIAN\6.1\SERIES60\EPOC32EX\SMSROUTER\SRC\Smsrouterdata.cpp(58) : error C2227: left of '->Document' must point to class/struct/union

  2. #2
    Regular Contributor
    Join Date
    Oct 2003
    Location
    Spain
    Posts
    329
    Is your class derived from CEikApplication?

    If no, try CEikonEnv::Static() instead of iEikonEnv.

    I hope it helps.
    Toni.

Posting Permissions

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