🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #16037

Re: FilenameFilter

#16037
From: Vasudevan Srinivasan
Date: Thu, 08 Apr 1999 00:00
39 lines
2176 bytes
Patrick Carroll wrote:

> I looked in the Java documentation and found:
>
>     Interface java.io.FilenameFilter
>
> The "Interface" bit is somwwhat of a giveaway.
>
> To set a filter for the Filer, you must create  a class that implements
> FilenameFilter. This interface includes an accept() method that returns a
> boolean value indicating whether a particular file meets the filtering
> specifications laid out in accept().  For example, accept() might return
> true if a file has a .java extension.
>
> Gavin wrote:
>
> > I'm having a real problem incorporating a FilenameFilter into a filer.
> > I have a FilenameFilter called only, which only allows for files ending
> > in .viewer
> >
> > I know for a fact that this works - having used it with the File.list()
> > command successfully.
> >
> > However, when I use filer1.setFilenameFilter (only), I get an error
> > message saying
> > "FilenameFilter not implemented".
> > Why is this appearing.???!!!  The filer still appears when the show()
> > method is called, but the only option available is all files (*.*).
> > Please help me, this is dead annoying!!
> >
> > By the way, I'm running this on Windows 95, if that changes anyfink.

Hi,
I have tried but this unfortunately does not work. The accept() method never
gets called at all. Its always the "All files" in the combo. Its true that it
works for File.list() but when used with FileDialog, nope. Before I conclude
that its a bug, I would be happy to find some documentation on it.

Vasu
Technical Details
Message-ID: <370D5902.490160A2@worldnet.att.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <370CC4FC.283DF2DF@apion-tss.com> <370CF5B0.7C32072A@witsys.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,71e2ddba0b7f022a
X-Google-Attributes: gidf74b3,public
From: Vasudevan Srinivasan <vasya10@worldnet.att.net>
Subject: Re: FilenameFilter
Date: 1999/04/08
Message-ID: <370D5902.490160A2@worldnet.att.net>
X-Deja-AN: 464259108
Content-Transfer-Encoding: 7bit
References: <370CC4FC.283DF2DF@apion-tss.com> <370CF5B0.7C32072A@witsys.com>
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Reply-To: vasya10@worldnet.att.net
Newsgroups: borland.public.jbuilder.java.language