×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 23
  1. #1
    Registered User
    Join Date
    May 2009
    Location
    India
    Posts
    42

    Occurrence of 'CleanupClosePushL'

    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
    Super Contributor
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034

    Re: Occurrence of 'CleanupClosePushL'

    Means you used method CleanupClosePushL() there. BTW what is the actual problem?

  3. #3
    Registered User
    Join Date
    May 2009
    Location
    India
    Posts
    42

    Re: Occurrence of 'CleanupClosePushL'

    Due to this when i run my program its give error "SYSTEM ERROR -1"

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

    Re: Occurrence of 'CleanupClosePushL'

    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
    Join Date
    May 2009
    Location
    India
    Posts
    42

    Re: Occurrence of 'CleanupClosePushL'

    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
    Join Date
    Aug 2003
    Location
    Oulu, Finland
    Posts
    1,122

    Re: Occurrence of 'CleanupClosePushL'

    What is in FilePath?

    Lauri

  7. #7
    Super Contributor
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034

    Re: Occurrence of 'CleanupClosePushL'

    Also which line gives you errors?

  8. #8
    Super Contributor
    Join Date
    Mar 2004
    Location
    Bangalore,India
    Posts
    2,146

    Re: Occurrence of 'CleanupClosePushL'

    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
    Super Contributor
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034

    Re: Occurrence of 'CleanupClosePushL'

    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
    Join Date
    Apr 2008
    Posts
    146

    Re: Occurrence of 'CleanupClosePushL'

    Also
    5) Use e.g. BaflUtils::FileExists to check out if the file really exists before opening it.

  11. #11
    Registered User
    Join Date
    May 2009
    Location
    India
    Posts
    42

    Re: Occurrence of 'CleanupClosePushL'

    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
    Join Date
    Aug 2003
    Location
    Oulu, Finland
    Posts
    1,122

    Re: Occurrence of 'CleanupClosePushL'

    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
    Join Date
    May 2009
    Location
    India
    Posts
    42

    Re: Occurrence of 'CleanupClosePushL'

    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
    Join Date
    Oct 2005
    Location
    Hyderabad,India
    Posts
    1,156

    Re: Occurrence of 'CleanupClosePushL'

    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
    Join Date
    Aug 2003
    Location
    Oulu, Finland
    Posts
    1,122

    Re: Occurrence of 'CleanupClosePushL'

    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

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
    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
  •  
×