Re: Request for implementation: MimeTypeArrayAttribute

Hi !

----

Benoit Mahe wrote:

> > > On Tue, 4 May 1999, Roland Mainz wrote:
> > >
> > > > ----
> > > > I'm working on a new filter class and need a new type of attribute:
> > > > A MimeTypeArray-Attribute class (like StringArrayAttribute, but holding
> > > > an array
> > > > of MimeType objects...)
> > >
> > > Yes, combination of low level attributes and array should be here, not
> > > only MimeTypeAttribute, we will do that ASAP.
> >
> > Question: What happens if I change the data type of on attribute ?
>
> > Background:
> > I wrote the CompressFrame which uses a StringArray as an argument,
> > which should be an array of MimeType's (e.g. the "mime-type" argument,
> > which lists the type of outgoing mimetypes which should be compressed
> > (I've choosed text/* for CompressFilter as the default, which should cover
> > the most common things)).
> >
> > What happens if I change this silently from StringArrayAttribute to
> > MimeTypeArrayAttribute inside the code ?
>
> Jigsaw won't like it :(

Then the best way is to rename the attribute (IMHO).
Another idea would be to make MimeTypeArrayAttribute a subclass of
StringArrayAttribute, which makes it backwards-compatible to values stored by
StringArrayAttribute; single array entries are stored using MimeType.toString() and
restored using the constructor MimeType( String x );
Other array types like LongArrayAttribute, IntArrayAttribute are implemented as
"native" classes (e.g. no subclass of any other *ArrayAttribute class), but more
complex attributes are all subclasses of StringArrayAttribute...

----

Bye,
Roland

--
  __ .  . __
 (o.\ \/ /.o)  Roland Mainz                               C programmer
  \__\/\/__/   Roland.Mainz@informatik.med.uni-giessen.de MPEG specialist
  /O /==\ O\   gisburn@w-specht.rhein-ruhr.de             Sun&&Amiga programmer
 (;O/ \/ \O;)  TEL +49 (0) 2426901568  FAX +49 (0) 2426901569

Received on Wednesday, 5 May 1999 09:45:07 UTC