required vs optional

Peter Rice Peter.Rice at uk.lionbioscience.com
Thu Feb 8 13:13:45 UTC 2001


James Bonfield wrote:
> I think you understand why I want to grey-out options. I do not want to
> grey-out things which are merely optional, but things which really have no
> effect whatsoever. For example -graph when -plot is 0. In this case EMBOSS
> will not be using a default value, rather it won't be using it at all (and
> specifying it on the command line will have no effect). This sort of thing
> happens more often than you'd expect.
> 
> Hence I do not think we can use opt/req for this as they already have other
> purposes.

OK. Since you are a good boy (i.e. you can cope with ACD expressions and
stuff) let us experiment with a new option for GUIs only.

How about:

needed:y or needed:n

default value would be assumed to be (parameter or required or optional)
unless you think a default of Y is better.

for cases where this is not enough, we expect to use an expression.

In ajax/ajacd.c:

static int nDefAttr = 11;
... change to 12

enum AcdEDef {
... add at the end:

   DEF_NEEDED    (with a comma for DEF_EXPECTED on the line above)

AcdOAttr acdAttrDef[] = {

... add before the NULL, VT_NULL line:

    {"needed", VT_BOOL}, /* value is needed, i.e. useful */

EMBOSS should now accept needed: in ACD files for all definitions
(note: this is how comment, corba and style should have been added for
cleanness)


-- 
------------------------------------------------
Peter Rice, LION Bioscience Ltd, Cambridge, UK
peter.rice at uk.lionbioscience.com +44 1223 224723






More information about the emboss-dev mailing list