×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Super Contributor
    Join Date
    Jul 2008
    Posts
    2,020

    KErrNotFGound when loading images from MBM

    Hello Folks,
    I use the code below to load icons into a list box at ruintime - unfortunately, it always dies with an error -1.
    Code:
    _LIT(KSvgFile, "z:\\resource\\apps\\LocaNote_aif.mbm");
    
    //this one is for the bitmaps
    #include <LocaNote_aif.mbg>
    
    ...
    
    
    	if(LstFiles()->ItemDrawer()->ColumnData()->IconArray()==NULL)
    		{
    			//create the array
    			iconArray = new( ELeave ) CAknIconArray( 1 );
    			LstFiles()->ItemDrawer()->ColumnData()->SetIconArray(iconArray);
    			TInt error;
    			
    			// we now need to create the folder and goUp icons
    			CFbsBitmap* tempBitmap = new (ELeave)CFbsBitmap();
    			
    
    			error=tempBitmap->Load(KSvgFile,EMbmLocanote_aifGraf_bar_wide_landscape,EFalse);
    			
    			CFbsBitmap* tempMaskMap=new (ELeave)CFbsBitmap();
    			error=tempMaskMap->Load(KSvgFile,EMbmLocanote_aifFolderup,EFalse);
    
    			
    		    CGulIcon* emailListIcon = CGulIcon::NewL(tempBitmap, tempMaskMap);
    		    iconArray->AppendL( emailListIcon );
    
    			tempBitmap = new (ELeave)CFbsBitmap();
    			error=tempBitmap->Load(KSvgFile,EMbmLocanote_aifFolderup,EFalse);
    			tempMaskMap=new (ELeave)CFbsBitmap();
    			error=tempMaskMap->Load(KSvgFile,EMbmLocanote_aifFolderup_mask,EFalse);
    		    			
    		    emailListIcon = CGulIcon::NewL(tempBitmap,tempMaskMap);
    		    iconArray->AppendL( emailListIcon );
    		}
    The weird thing is that I use other icons from the same file later in the program and have no problem - I then load them like this:
    Code:
    void CSvgHandler::LoadIconL(const TDesC& aIconFile, TInt aIndex, CFbsBitmap*& aBitmap, CFbsBitmap*& aMask, TSize aSize)
       {
       AknIconUtils::CreateIconL(aBitmap, aMask, aIconFile, aIndex, aIndex + 1);
       AknIconUtils::SetSize(aBitmap, aSize);
       AknIconUtils::SetSize(aMask, aSize);
       }
    
    void CSvgHandler::LoadIconL(const TDesC& aIconFile, TInt aIndex, CFbsBitmap*& aBitmap, TSize aSize)
       {
       aBitmap = AknIconUtils::CreateIconL(aIconFile, aIndex);
       AknIconUtils::SetSize(aBitmap, aSize);
       }
    Do you guys have any idea what is going on here?

    All the best
    Tam Hanna
    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

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,734

    Re: KErrNotFGound when loading images from MBM

    Based on "KSvgFile", you might have .svg files - if this is the case, note that CFbsBitmap::Load can not handle them.

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

    Re: KErrNotFGound when loading images from MBM

    No - I am importing a bmp file!
    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

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,734

    Re: KErrNotFGound when loading images from MBM

    Does that file (epoc32\release\winscw\udeb\z\resource\apps\LocaNote_aif.mbm - assuming that the question is about the emulator) exist?

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

    Re: KErrNotFGound when loading images from MBM

    Hi,
    yep, it does - in fact, there is an mif and an mbm file there!

    All the best
    Tam Hanna
    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

  6. #6
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,734

    Re: KErrNotFGound when loading images from MBM

    Are you familiar with the French expression 'deja vu'?
    http://discussion.forum.nokia.com/fo...d.php?t=166285

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

    Re: KErrNotFGound when loading images from MBM

    Not really - these are different issues.

    Now, the ID's are correct and work in the emulator - the error only occurs on the device!
    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

  8. #8
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,734

    Re: KErrNotFGound when loading images from MBM

    On the device it is rather probable that your files will not appear on drive z:. My guess is that you use something else than KSvgFile when invoking LoadIconL.

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

    Re: KErrNotFGound when loading images from MBM

    Quote Originally Posted by wizard_hu_ View Post
    On the device it is rather probable that your files will not appear on drive z:. My guess is that you use something else than KSvgFile when invoking LoadIconL.
    Hi Wizard,
    I have no idea how that Z got in there - the other line of code did not use it.

    Very sorry. In case anyone else ever has the problem - the correct line looks like this:
    Code:
    _LIT(KSvgFile, "\\resource\\apps\\LocaNote_aif.mbm");
    All the best and thanks
    Tam
    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

Similar Threads

  1. Memory leak when unloading and loading images
    By jheanley in forum Mobile Java Media (Graphics & Sounds)
    Replies: 3
    Last Post: 2009-04-09, 16:00
  2. Getting images from different MBM file in ListBox
    By anoopd in forum Symbian User Interface
    Replies: 8
    Last Post: 2006-02-21, 06:34
  3. Dynamic loading and converting to MBM
    By whitemoon in forum Symbian User Interface
    Replies: 3
    Last Post: 2003-11-04, 04:39
  4. Loading images - bug or no bug ?
    By mcmcdonald in forum Mobile Java General
    Replies: 2
    Last Post: 2003-04-22, 09:05

Posting Permissions

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