×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Aug 2006
    Posts
    33

    emcc company tells lie!!!

    I downloaded the emcc's books example some days ago,url: http://www.symbian.com/books,when I build the example "MultiMediaF" with carbide.c++ express and "2nd Edition SDK Feature Pack 2" sdk ,not error occur,but the app don't run as we expect. if you debug the project,you will find the emcc company tell lie!,please debug the code following this:
    1: use carbide.c++ to import the "MultiMediaF" project.
    2: open the "MutilMediaF" project in carbide.c++ workplace,locate src folder and open the "MultiMediaFAdapter.cpp"file, please find the function:

    /********************************
    note: this explanation written by me,the details please see the project

    KPathOfGifFile is : _LIT(KPathOfGifFile, "\\system\\apps\\MultiMediaF\\GifFile.gif");
    iFs is : RFs instance,it have been correctly connected the file server
    ********************************/
    void CMultiMediaFAdapter:ecodeOpenAndConvertL()
    {
    delete iDecoder;
    iDecoder = 0; //make a breakpoint here, point: 1

    iDecoder = CImageDecoder::FileNewL(iFs, KPathOfGifFile);//make a breakpoint here, point: 2


    TFrameInfo frmInfo = iDecoder->FrameInfo(KGifIndex);//make a breakpoint here point: 3

    TRect rectOfImage = frmInfo.iFrameCoordsInPixels;

    delete iImage;
    iImage = 0;
    iImage = new (ELeave) CFbsBitmap();
    iImage->Create(rectOfImage.Size(), iDeviceDisplayMode);

    iDecoder->Convert(&iStatus, *iImage, KGifIndex);

    SetActive();
    }
    now,right click the "MutilMediaF" project,select "debug as",select "debug",
    you will find,when appliction pause Point:1 ,watch iFs value,it has a numeric handle vaule,it means iFs already connect the file server correctly,and click "step over",now,the appliction run at point:2, and then click "step over",the appliction can't run at point,actually,appliction has leave,point:2 occured a fatal error.I don't know why it occured such error.
    so my question is: 1: what error it occured?
    2: if you create a "Images" folder at "MutilMediaF" project subfolder,and paste a "abc.jpg" file at "Images" folder,how to use the "abc.jpg" at you project,such as you want to show "abc.jpg" at screen by emulator.
    thanks!
    my English is not good,pardon!

  2. #2
    Super Contributor
    Join Date
    Nov 2005
    Location
    London
    Posts
    584

    Re: emcc company tells lie!!!

    I don't think EMCC are deliberately misleading you - the book is in fact full of useful information )

    If you're getting a leave a 2, it could be because GifFile.gif isn't in the location it's supposed to be (KPathOfGifFile). This could be because, when EMCC wrote the example, they intended it to be built using command line tools (i.e. bldmake bldfiles, then abld build) which will export GifFile.gif to the correct location under \system\apps.

    Check if it's there - if it is, I've misled you too - sorry! But if it's not there, you may be able to fix it by either copying it, or (better still) using abld export to ensure it gets copied, then try the example again. It would be great if you could post the result when you've got it working, so other people having similar issues find the solution.

    Hope it helps )

  3. #3
    Registered User
    Join Date
    Aug 2006
    Posts
    33

    Re: emcc company tells lie!!!

    thank stichbury for your reply.now I have resolved the problem,I also say sorry to EMCC Company, I don't konw they built projects using command line tools.
    there is my steps to resolved the problem: ( run at emulator )
    1: copy "GifFile.gif " to " \\system\\apps\\MultiMediaF\\ " directory.
    2: add some code at DecodeOpenAndConvertL() function. just like:


    void CMultiMediaFAdapter: DecodeOpenAndConvertL()
    {
    delete iDecoder;
    iDecoder = 0; //make a breakpoint here, point: 1

    /***************************************
    *note: add some code here,the code writen by me
    *
    ***************************************/
    TFileName fullname = KPathOfGifFile();//after this,fullname is:
    // "\\system\\apps\\MultiMediaF\\GifFile.gif"

    CompleteWithAppPath(fullname); // after this,fullname is:
    // "Z:\\system\\apps\\MultiMediaF\\GifFile.gif", "Z:" have been add,so
    //the iDecoder can file the file

    /**************************************/

    iDecoder = CImageDecoder::FileNewL(iFs, KPathOfGifFile);//make a breakpoint here, point: 2


    TFrameInfo frmInfo = iDecoder->FrameInfo(KGifIndex);//make a breakpoint here point: 3

    TRect rectOfImage = frmInfo.iFrameCoordsInPixels;

    delete iImage;
    iImage = 0;
    iImage = new (ELeave) CFbsBitmap();
    iImage->Create(rectOfImage.Size(), iDeviceDisplayMode);

    iDecoder->Convert(&iStatus, *iImage, KGifIndex);

    SetActive();
    }

    I hope this can help someone who met the same problem like me.
    Good Luck!

    chenqing 23/8/2006

  4. #4
    Registered User
    Join Date
    Jul 2007
    Posts
    3

    Re: emcc company tells lie!!!

    Don't forget that if its on a 2nd edition SDK then carbide wasn't in use at the time anyway It would have to have been built either with codewarrior (only really available to professionals, expensive and has a strange way of building symbian projects) or with the command line.

    It's odd that carbide didn't export the file correctly though... that to me is slightly worrying as I have to use Carbide a lot in my daily work.

Similar Threads

  1. M2M Solution for Oil Company
    By munaf in forum Nokia M2M
    Replies: 1
    Last Post: 2004-12-28, 08:15

Posting Permissions

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