简体   繁体   English

空中应用程序的文件类型关联

[英]File type association of an air application

I am creating an air application which shows the path of a file when the file is dropped into the application icon. 我正在创建一个air应用程序,当将文件放入应用程序图标时,它会显示文件的路径。 Works great in windows but in Mac the application icon do not accept any file to be dropped over it. 在Windows中效果很好,但在Mac中,应用程序图标不接受任何要在其上拖放的文件。 So for testing I registered a .txt file to the application using application descriptor 因此,为了进行测试,我使用应用程序描述符向应用程序注册了一个.txt文件

        <!-- The name that the system displays for the registered file type. Required. -->
        <name>myAIREditor.Text</name>

        <!-- The extension to register. Required. -->
        <extension>txt</extension>

        <!-- The description of the file type. Optional. -->
        <description>myAIREditor text description file</description>

        <!-- The MIME content type. -->
        <contentType>text/plain</contentType>

        <!-- The icon to display for the file type. Optional. -->
        <!-- <icon>
            <image16x16></image16x16>
            <image32x32></image32x32>
            <image48x48></image48x48>
            <image128x128></image128x128>
        </icon> -->

    </fileType>

and alas, text files can be dropped over the application icon and it shows the path. 而且,可以将文本文件拖放到应用程序图标上,并显示路径。 Now do I have to do it for all of 10 billion file types? 现在我必须对所有100亿个文件类型执行此操作吗?

Is there a way so that I can tell my app to accept any kind of file no matter what the extension is? 是否有一种方法可以告诉我的应用程序,无论扩展名是什么,都可以接受任何类型的文件?

Without saying how you're handing a drag in/drop exactly then it's impossible to offer assistance. 如果不确切说明您将如何进行拖放,那么就不可能提供帮助。

Try checking out this helpful document to see if it applies to your situation. 尝试查看此有用的文档,以查看它是否适用于您的情况。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM