required vs optional

James Bonfield jkb at mrc-lmb.cam.ac.uk
Wed Feb 7 17:50:53 UTC 2001


On Wed, Feb 07, 2001 at 05:30:48PM +0000, Peter Rice wrote:
> I am a little confused there. This definition:
> 
>   int: shuffle [ req: N def: 1 info: "Number of shuffles" ]
> 
> is opt: N (the default - all these default to false)

Sorry, I thought opt: Y was the default.

Incidently is there a list anywhere of all the default values? Eg including
info, prompt, etc. Sometimes info: is used and sometimes prompt:, but often
none are present. However emboss still prompts with an appropriate query -
where does this come from? I can see some in the ajacd.c code, but not
all. Besides reading the code to find the defaults isn't my idea of fun :-)

> on. My suspicion is that only a few keen users are really using the -options
> qualifier, but in any case it was aimed as much at the GUI developer as at the
> user who didn't want too many prompts.

Agreed. So just to clarify things, if the physical values or results from
expressions give the following, then I need to enable or disable (grey-out)
the question appropriately:

req	     opt		greyed out
Y	     N			N
Y	     Y			N
N	     N			N
N	     Y			Y

Do req:N opt:N and req:Y opt:Y ever occur? They sound like inconsistencies.
Anyway, only when it's optional and not required should I grey them out.
However as optional defaults to N only places where opt:Y is explicitly stated
will I ever grey out paramaters, which unfortunately includes all those
graphics options (eg this is syco):

 bool: plot [ opt: N info: "Produce plot" ]

 xygraph: graph [ req: $(plot) multi: 3 ]

 outfile: outfile [ req: @(!$(plot)) ]

I assume that I can just add opt:Y to the graph and outfile without breaking
anything. I must admit though that this would be much easier if there was one
single parameter to check as it makes the tcl variable tracing harder to
write - rather than a trace of a single variable I have to produce a new
variable consistencing of an expression (using req and opt) and trace that
instead.

James

-- 
James Bonfield (jkb at mrc-lmb.cam.ac.uk)   Tel: 01223 402499   Fax: 01223 213556
Medical Research Council - Laboratory of Molecular Biology,
Hills Road, Cambridge, CB2 2QH, England.
Also see Staden Package WWW site at http://www.mrc-lmb.cam.ac.uk/pubseq/






More information about the emboss-dev mailing list