【问题标题】:FileDialog getFilterIndex() Method returning -1FileDialog getFilterIndex() 方法返回 -1
【发布时间】:2020-11-26 11:33:36
【问题描述】:

我是 Java SWT 对话框的新手,我正在尝试制作一个文件选择器。我以 Eclipse 网站的 sn-p 为例:https://git.eclipse.org/c/platform/eclipse.platform.swt.git/tree/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet72.java 我需要知道用户选择的过滤器,我通过做一些事情来做到这一点: int idx = dialog.getFilterIndex(); followed by String filter = dialog.getFilterNames[idx]; 在 linux (ubuntu 18.04) dialog.getFilterIndex() 上,即使我选择了一个过滤器,它也会返回 -1。有什么想法吗?

谢谢

【问题讨论】:

  • 看起来像 Eclipse 错误546256
  • 看起来像。也许发布您的答案,以便我可以将其作为接受的答案。谢谢你。 @greg-449

标签: java linux swt


【解决方案1】:

这看起来像 Eclipse 错误546256

这个错误仍然存​​在。错误报告表明 GTK 3 GtkNativeChooserDialog 代码存在问题。

【讨论】:

    猜你喜欢
    • 2015-06-18
    • 1970-01-01
    • 2018-02-03
    • 1970-01-01
    • 2011-01-13
    • 2016-10-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多