Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 23
  1. #1
    Registered User mittali's Avatar
    Join Date
    May 2009
    Location
    India
    Posts
    42
    hi
    i want to know what is the meaning of Occurrence of 'CleanupClosePushL' when i put cursor over CleanupClosePushL line
    plz help me
    Thanks in advance

  2. #2
    Nokia Developer Champion savaj's Avatar
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034
    Means you used method CleanupClosePushL() there. BTW what is the actual problem?

  3. #3
    Registered User mittali's Avatar
    Join Date
    May 2009
    Location
    India
    Posts
    42
    Due to this when i run my program its give error "SYSTEM ERROR -1"

  4. #4
    Nokia Developer Expert symbianyucca's Avatar
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    28,673
    Can you show a bit more on code, so we could see what you are trying to do. -1 would indicate that something can not be found.

  5. #5
    Registered User mittali's Avatar
    Join Date
    May 2009
    Location
    India
    Posts
    42
    void CGraphicsAppView::ConstructL( const TRect& aRect )
    {
    CreateWindowL();
    SetRect( aRect );

    RFile rFile;
    User::LeaveIfError(rFile.Open(CCoeEnv::Static()->FsSession(),FilePath,EFileStreamText));
    CleanupClosePushL(rFile);
    RFileReadStream inputFileStream(rFile);
    CleanupClosePushL(inputFileStream);
    fileData = HBufC::NewLC(inputFileStream, 32);

    ActivateL();
    }



    void CGraphicsAppView:raw( const TRect& /*aRect*/ ) const
    {


    CWindowGc& gc = SystemGc();
    TRect drawRect(Rect());
    // Clears the screen
    gc.Clear(drawRect);

    gc.DrawRect(drawRect);
    //Use draw text function for
    gc.DrawText(*fileData,TPoint(10,50));
    }


    This code is used by me and give system error -1
    Mitali

  6. #6
    Registered User laa-laa's Avatar
    Join Date
    Aug 2003
    Location
    Oulu, Finland
    Posts
    1,122
    What is in FilePath?

    Lauri

  7. #7
    Nokia Developer Champion savaj's Avatar
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034
    Also which line gives you errors?

  8. #8
    Super Contributor mayankkedia's Avatar
    Join Date
    Mar 2004
    Location
    Bangalore,India
    Posts
    2,146
    Quote Originally Posted by mittali View Post
    User::LeaveIfError(rFile.Open(CCoeEnv::Static()->FsSession(),FilePath,EFileStreamText));
    I would think the FilePath specified by you in the code is the culprit causing the KErrNotFound(-1), please check that you are passing the correct file path.

    Cheers,
    Mayank

  9. #9
    Nokia Developer Champion savaj's Avatar
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034
    Also
    1)follows naming conventions.
    2)do not forgot to popup the rFile and inputFileStream from cleanup stack.
    3)close file handles.
    4)Dont put class variable fileData to cleanup stack.

  10. #10
    Regular Contributor anttijuu's Avatar
    Join Date
    Apr 2008
    Posts
    146
    Also
    5) Use e.g. BaflUtils::FileExists to check out if the file really exists before opening it.

  11. #11
    Registered User mittali's Avatar
    Join Date
    May 2009
    Location
    India
    Posts
    42
    i m declare filepath in .h as
    _LIT(FilePath,"C:\\test.txt");
    and check a text file created in c drive

    now what to do
    plz help
    Mitali

  12. #12
    Registered User laa-laa's Avatar
    Join Date
    Aug 2003
    Location
    Oulu, Finland
    Posts
    1,122
    Quote Originally Posted by mittali View Post
    i m declare filepath in .h as
    _LIT(FilePath,"C:\\test.txt");
    and check a text file created in c drive
    And you're sure test.txt is on emulator C: drive (epoc32\winscw\c) and not on Windows C: drive?

    Lauri

  13. #13
    Registered User mittali's Avatar
    Join Date
    May 2009
    Location
    India
    Posts
    42
    It is on Computer C drive.
    I want to read a text file which is on C Drive is it Possible?
    Mitali

  14. #14
    Super Contributor Priju Jacob Paul's Avatar
    Join Date
    Oct 2005
    Location
    Hyderabad,India
    Posts
    1,156
    Quote Originally Posted by mittali View Post
    It is on Computer C drive.
    I want to read a text file which is on C Drive is it Possible?
    Nope, that is not possible. Here C drive points to epoc32\Winscw\c\
    Place your file there and test.

    - Priju

  15. #15
    Registered User laa-laa's Avatar
    Join Date
    Aug 2003
    Location
    Oulu, Finland
    Posts
    1,122
    No. Only emulated Symbian OS drives like C: (under epoc32\winscw\c in Windows), D: (epoc32\winscw\d) and Z: (epoc32\release\winscw\udeb\z) are accessible through Symbian OS file operations.

    Lauri

Page 1 of 2 12 LastLast

Similar Threads

  1. Occurrence of some class
    By phanvantiep in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 21
    Last Post: 2009-06-25, 05:52
  2. Replies: 7
    Last Post: 2009-04-28, 10:57
  3. CleanupClosePushL() problem
    By meenuj in forum Symbian User Interface
    Replies: 1
    Last Post: 2003-05-22, 18:15
  4. CleanupClosePushL
    By koayst in forum Symbian C++
    Replies: 1
    Last Post: 2003-04-24, 14:10

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