This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 197457 - FileChooserBuilder.SelectionApprover does not receive any selection
Summary: FileChooserBuilder.SelectionApprover does not receive any selection
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 normal (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-05 17:56 UTC by osv
Modified: 2011-04-15 08:39 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description osv 2011-04-05 17:56:52 UTC
The FileChooserBuilder.SelectionApprover approve method is always called with an empty File[] array that makes no approving possible.

        File any = new FileChooserBuilder("openFilePreference")
                .setTitle("Fails to select any file"))
                .setSelectionApprover(new FileChooserBuilder.SelectionApprover() {
                    @Override
                    public boolean approve(File[] selection) {
                        return selection.length != 0;
                    }

                }).setApproveText("Open").showOpenDialog();
Comment 1 Jaroslav Tulach 2011-04-07 07:41:59 UTC
ergonomics#ef7a32640b90
Comment 2 Quality Engineering 2011-04-15 08:39:48 UTC
Integrated into 'main-golden', will be available in build *201104150401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/ef7a32640b90
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #197457: Make sure we pass into SelectionApprover some value even if single file is selected