×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Dec 2009
    Posts
    2

    [moved] Symbian OS Basics Workbook v3.1 en

    regards,

    going trough labs and at lab 8 have discovered bug in example.
    at page 268 point 4 states:
    4. Add some more code to the function, as shown in bold below, to create a directory:
    Code:
    ...
    RFs fs;
    User::LeaveIfError(fs.Connect());
    CleanupClosePushL(fs);
    TParsePtrC parse(KDataFilePath);
    TPtrC pathPtr = parse.DriveAndPath();
    User::LeaveIfError(fs.MkDirAll(pathPtr));
    }
    if lab 8 executes with this code second try to write to file will fail with error (-11) KErrAlreadyExists, at line: User::LeaveIfError(fs.MkDirAll(pathPtr));
    Documentation example code should be replaced with following:

    Add some more code to the function, as shown in bold below, to create a directory:
    Code:
    ...
    RFs fs;
    User::LeaveIfError(fs.Connect());
    CleanupClosePushL(fs);
    TParsePtrC parse(KDataFilePath);
    TPtrC pathPtr = parse.DriveAndPath();
        // [NB] if directory path exists, error (-11) KErrAlreadyExists will be returned!!!    
        TInt ret = fs.MkDirAll(pathPtr);
        switch(ret)
        {
            case KErrNone:
    	case KErrAlreadyExists:
    		break;
    	default:
            	User::Leave(ret);
    	        break;    	
        }
    }
    and later in point 5 in code section
    Code:
    TInt ret = file.Open(fs, KDataFilePath, EFileWrite | EFileStreamText);
    should be replaced with
    Code:
    ret = file.Open(fs, KDataFilePath, EFileWrite | EFileStreamText);
    as variable ret is already declared.

    Edit:
    Symbian OS Basics
    Course Pack
    Course Number: 04300
    This course pack contains:
    - Workbook

    Published by NOKIA: BO-EN-04300-20080108

  2. #2
    Super Contributor
    Join Date
    Jul 2008
    Posts
    2,020

    Re: Symbian OS Basics Workbook v3.1 en

    Please post that in the Symbian Forums - I don't think that Nokia has published the tome!
    The lines above are the best I have to offer.If anyone of you is of more advanced knowledge, I ask for your patience and understanding! - unknown arab poet
    http://www.tamoggemon.com - Symbian blog - Windows Phone blog
    My other blogs:
    webOS blog iPhone blog BlackBerry blog Samsung bada blog Android blog

  3. #3
    Registered User
    Join Date
    Dec 2009
    Posts
    2

    Re: Symbian OS Basics Workbook v3.1 en

    Quote Originally Posted by tamhanna View Post
    Please post that in the Symbian Forums - I don't think that Nokia has published the tome!
    It is published by Nokia,
    added publisher at the end of my OP.

    Main target of book is developers training Symbian OS Basics on Carbide C++ IDE...
    For mobile beginers, such as me but noticed bug in lab so just reporting it.
    wasn't sure where to report it I've serched forum and discovered there are few more topics on this book in this forum so decided to post it here.

    // NB

  4. #4
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,355

    Re: Symbian OS Basics Workbook v3.1 en

    Well, I would welcome errors in the Workbook examples otherwise they would only teach how to copy/paste on Windows
    We have dedicated forums on this discussion board for developers to give feedback on our resources (docs, examples, trainings). I will move this thread there so that it will be noticed by the resource owners.
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

Similar Threads

  1. Symbian OS 9.1 and RTP
    By sajidul in forum Series 40 & S60 Platform Feedback Archive
    Replies: 0
    Last Post: 2007-01-08, 05:12
  2. Oracle Database Lite 10g Available for Symbian OS Phones
    By chirag_cel in forum News, Announcements and Job Listings
    Replies: 2
    Last Post: 2006-12-11, 07:00
  3. Why we need Series 60 MIDP SDK 2.1 for Symbian OS?
    By lauyk001 in forum Mobile Java General
    Replies: 4
    Last Post: 2004-12-29, 03:37
  4. Global Symbian Development Opportunities *High Importance*
    By sara.lindsay in forum Symbian C++
    Replies: 2
    Last Post: 2004-05-08, 09:09
  5. Global Symbian Development Opportunities *High Importance*
    By sara.lindsay in forum Symbian C++
    Replies: 0
    Last Post: 2004-05-07, 11:45

Posting Permissions

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