Read-only archive of the All About Symbian forum (2001–2013) · About this archive

Problem opening multiple images

0 replies · 1,070 views · Started 19 August 2005

Hi, I'm having a problem displaying multiple images... When I compile... I get this error message...


C:\SYMBIAN\6.1\SERIES60\SERIES60EX\BMPMANIP\SRC\Bmpmanipappview.cpp(84) : error C2664: 'OpenL' : cannot convert parameter 1 from 'unsigned short' to 'const class TDesC16 &'
Reason: cannot convert from 'unsigned short' to 'const class TDesC16'
No constructor could take the source type, or constructor overload resolution was ambiguous
Bmpmanipdocument.cpp
Eikonenvironment.cpp
Bmpmanip.uid.cpp
Generating Code...
Error executing cl.exe.

BMPMANIP.APP - 1 error(s), 0 warning(s)

Here's ,my code...


RFs FileSession;
CDir *dirList = NULL;
TInt8 i;
TBuf<256> totalPath;
TBuf<50> fileName;

TInt n;

_LIT( KDirName, "c:\\System\\Apps\\Bmpmanip\\" );
_LIT( KFileSpec,"c:\\System\\Apps\\Bmpmanip\\*.gif" );

void CBmpmanipAppView::ConstructL(const TRect& aRect)
{
// Create a window for this application view
CreateWindowL();

// Set the windows size
SetRect(aRect);

// Activate the window, which makes it ready to be drawn
ActivateL();

//Initialize file iterator to zero
n=0;

//Make a list of gif files and put them into an array
GetFilesL();

iBitmap = new (ELeave) CFbsBitmap();

iRotator = CMdaBitmapRotator::NewL();
iFileSaver = CMdaImageBitmapToFileUtility::NewL(*this);
iScaler = CMdaBitmapScaler::NewL();

iConverter = CMdaImageFileToBitmapUtility::NewL(*this);
//Start an asynchronous process to open the gif file
iConverter->OpenL(fileName[n]);
}

void CBmpmanipAppView::GetFilesL()
{
FileSession.Connect();

if( KErrNone != FileSession.GetDir(KFileSpec,KEntryAttMaskSupported,ESortByName,dirList) )
{
return;
}

for( i=0;i<dirList->Count();i++ )
{
fileName = (*dirList)[i].iName;
totalPath = KDirName;
totalPath.Append( _L("\\"😉 );
totalPath.Append( fileName );
}

if( dirList )
{
delete dirList;
dirList = NULL;
}
FileSession.Close();
}

The error occurs in iConverter->OpenL(fileName[n]) where I'd like to the from a list of files stored in an array... Thanks! 😉