×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Apr 2006
    Location
    Malaysia
    Posts
    246

    Error on ApplicationDriveAndPathL() for database

    Hi,

    I'm getting error for the following code. Based on DBMS example, I'm trying to use database for my application.


    Code:
    TFileName CSMSExampleAddressView::ApplicationDriveAndPathL() const
        {
        TFileName appfullname(Application()->AppFullName());
        TParse parse;
    
        #ifdef __WINS__   // See macro definition in DBMSDb.mmp
    
            // On development environment the AppFullName points to z drive.
            // Replace it to point to C drive, which is writable by our application.
            parse.Set(KCDrive, &appfullname, NULL);
    
        #else // In device use the application fullname directly.
            parse.Set(appfullname, NULL, NULL);
    
        #endif
    
        TFileName fn = parse.DriveAndPath();
        // Make sure the path exists (create if not). This is needed in EMULATOR.
        BaflUtils::EnsurePathExistsL(CCoeEnv::Static()->FsSession(), fn);
        return fn;
        }
    Error:
    "SMSExampleAddressView.cpp": Call to undefined function 'Application' in function CSMSExampleAddressView::ApplicationDriveAndPathL() const at line 211
    "SMSExampleAddressView.cpp": Pointer to structure required on left side of -> or ->* in function CSMSExampleAddressView::ApplicationDriveAndPathL() const at line 211


    Thanks
    Regards,
    Nini

  2. #2
    Super Contributor
    Join Date
    Oct 2005
    Location
    Hyderabad,India
    Posts
    1,156

    Re: Error on ApplicationDriveAndPathL() for database

    Hi,
    Try like this..

    1) TFileName app = CEikonEnv::Static()->EikAppUi()->Application()->AppFullName();

    or

    2) AppUi()->Application()->AppFullName();

    Hope that works out..

    Br,

    Priju

  3. #3
    Registered User
    Join Date
    Jul 2005
    Location
    Bengaluru, India
    Posts
    747

    Re: Error on ApplicationDriveAndPathL() for database

    The function Application is a member function of CEikAppUi. That's why you weren't able to access that from your view class. You may better try like this:

    Code:
    STATIC_CAST(CYourAppUi*, iAvkonAppUi)->Application()->AppFullName();

  4. #4
    Regular Contributor
    Join Date
    Apr 2006
    Location
    Malaysia
    Posts
    246

    Re: Error on ApplicationDriveAndPathL() for database

    Hi,

    Thank you guys. It's work ;)
    Regards,
    Nini

Posting Permissions

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