User Tag List

Results 1 to 8 of 8

Thread: please help with file extension filter stuff.

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Jun 2006
    Location
    St. Ave France
    Posts
    1,166
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    please help with file extension filter stuff.

    Hi everyone.

    I'm using the "file" extension in an app I'm making. I open up its save dialogue so someone can choose where and with what name to save data (an INI file) BUT I want the file they create to be forced to have a custom extension (".ABCD" for instance)

    I tried using the filter option in the file object and it now says at the bottom. Save as type: .ABCD BUT when I save a file, it seems to have no extension at all.

    How do I use the filter feature in the file extension to only show files ending with my custom .ABCD and only allow files to be saved with the extension .ABCD?


    Thanks

  2. #2
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: please help with file extension filter stuff.

    The path to open the file browser on must have the extension in it:
    "C:\bleh\*.ABCD"
    It works for me, however you cannot force the user to save this. (They can just type in *.EFGH and press enter) What you CAN do is break apart the file path, and replace the extension with your own, even if they saved it with a different extension.
    Working as fast as I can on Fusion 3

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Jun 2006
    Location
    St. Ave France
    Posts
    1,166
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: please help with file extension filter stuff.

    Thanks much for the info LB This should give me exactly what I needed.

  4. #4
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: please help with file extension filter stuff.

    Don't you have to put in "ABCD File|.ABCD" as the filter? It's a description and extension pair, if you only give it one, it'll use it as the filetype description (with no extension).

  5. #5
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: please help with file extension filter stuff.

    Well yes, but the filter only affects the visible files when it changes. When the dialog first opens up, it uses the default filename you give it to filter the visible files. Kind of annoying, but that's how it is.
    Working as fast as I can on Fusion 3

  6. #6
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: please help with file extension filter stuff.

    My point was that if you set the filter up correctly it will add your extension to the file if the user doesn't

    EDIT:
    I did this:
    File: Set extension filter to "ABCD File|*.ABCD"
    File: Set default extension to ".ABCD"
    File: Open save selector at ""
    String: Set string to result of file selector

    And got back bvc.ABCD even though I didn't type .ABCD into the file selector.

    EDIT2: And it filtered to .ABCD files without me having to specify *.ABCD as the default filename

  7. #7
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: please help with file extension filter stuff.

    But this doesn't work if you specify a directory to open on. I did what you did and I can confirm it, but opening on a specific directory doesn't seem to allow this.
    Working as fast as I can on Fusion 3

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Jun 2006
    Location
    St. Ave France
    Posts
    1,166
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: please help with file extension filter stuff.

    thanks alot guys, this is really useful information!

    To be extra safe I perform a check and add the extension while saving if its not there.

Similar Threads

  1. filter file in "file" extension
    By daniele in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 16th October 2013, 03:51 PM
  2. Graphics Filter, Audio Filter, and Transition SDK
    By kraminator in forum Extension Development
    Replies: 7
    Last Post: 27th March 2011, 08:40 PM
  3. [Request] Image filter extension
    By Carulosu in forum Extension Development
    Replies: 6
    Last Post: 28th August 2007, 10:18 AM

Posting Permissions

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