×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    India
    Posts
    1,173

    FILESELECTIONDIALOG not filtering the data

    Hi.......

    I am using FILESELECTIONDIALOG to show a "file selection" dialog. I want it to show only image files. For that I wrote the following code in .rss file:

    RESOURCE FILESELECTIONDIALOG r_file_selection_dialog
    {
    title = "Select-a-file:";
    root_path = "C:\\Nokia\\Images\\";
    filters =
    {
    FILTER
    {
    filter_type = EFilenameFilter;
    filter_style = EInclusiveFilter;
    filter_data={"*.jpeg","*.bmp","*.png","*.jpg","*.gif"};
    }
    };
    }

    In .cpp I am writing

    TBuf<50> iImageFileName;
    AknCommonDialogs::RunSelectDlgLD(iImageFileName, R_MEMORY_SELECTION_DIALOG,NULL);

    What should I do here to reflect the desired changes?

  2. #2
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,345

    Re: FILESELECTIONDIALOG not filtering the data

    Quote Originally Posted by not_dying View Post
    RESOURCE FILESELECTIONDIALOG r_file_selection_dialog
    {
    ...
    ...


    In .cpp I am writing

    TBuf<50> iImageFileName;
    AknCommonDialogs::RunSelectDlgLD(iImageFileName, R_MEMORY_SELECTION_DIALOG,NULL);

    What should I do here to reflect the desired changes?
    Are you calling the correct resource?


    Anyways, try calling as follows:

    Code:
    CAknFileSelectionDialog* dialog = 
    		CAknFileSelectionDialog::NewL(ECFDDialogTypeSelect, R_FILE_SELECTION_DIALOG);
    CleanupStack::PushL(dialog);
    TBool result = dialog->ExecuteL(iImageFileName);
    CleanupStack::PopAndDestroy(dialog);
    Nokia Developer Wiki Moderation team

  3. #3
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    India
    Posts
    1,173

    Re: FILESELECTIONDIALOG not filtering the data

    Thanks a lot Kiran for your suggestion. It was a mistake from my side. Actually, earlier I was thinking it is compulsory to call MemorySelectionDialog first, so I was not calling FileSelectionDialog. Anyways, Thanks once again.

Similar Threads

  1. Error while streaming binary/character data through servlet
    By akash_rawat in forum Streaming and Video
    Replies: 0
    Last Post: 2009-11-13, 19:33
  2. Why buffer the POST data on 6500? And response Out Of Memory Message!
    By sure0812 in forum Mobile Java Networking & Messaging & Security
    Replies: 6
    Last Post: 2009-05-26, 12:18
  3. Replies: 3
    Last Post: 2008-09-09, 04:53
  4. Replies: 1
    Last Post: 2007-04-17, 10:47
  5. Replies: 4
    Last Post: 2006-08-30, 10: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
  •  
×