[Soaplab-users] [Fwd: Re: [EMBOSS] How to use toggle properly ?]
Brought to you by:
marsenger
From: Sebastien M. <Seb...@un...> - 2008-04-24 13:19:48
|
>> I have an option (string symbcons) in my application that must be used >> only if another option is chosen (boolean cons). > > Dear Sebastien, > > I have some experience with writing EMBOSS programs and I think I can > help you. EMBOSS parses the ACD files from top to bottom, so you must > write the object "boolean: cons" first and "string: symbcons" later. To > make sure that the program at the command line will only prompt for > symbcons when cons is set to y, you must include in the objects cons an > attribute > standdard: "Y" > and in the object "string: symbcons" an attribute > standard: "$cons" > Or you put additional instead of standard. > Note that in case the user chooses n for cons, symbcons will not be > prompted for and will be set to its default value. You must hence make > sure that the C code of the program does something intelligent with that. > > Note that the objects of type boolean and toggle are handled the same by > EMBOSS. The distinction was introduced for the sake of GUI developers. > Note also that since there exist "expert" parameters that are neither > standard or optional. They are never prompted at the command line. To > allow GUI's to hide them the attribute "needed" was invented, but it > depends on the GUI whether it is supported. > > Regards, > Guy Bottu, > Belgian EMnet Node This kind of syntax doesn't seem to work properly in soaplab2. How can I do the same kind of toggle than in emma ? Here, I need to use symbcons when default value is chosen AND when cons is set to true. And use other symbcons values ONLY when cons is set to true. Now, cons and symbcons seem to work independently. boolean: cons [ additional: "Y" default: "false" comment: "defaults" comment: "method -&&" ] string: symbcons [ additional: "$(cons)" knowntype: "string" default: "B.*" minlength: 3 maxlength: 3 comment: "defaults" comment: 'method -&&=$"$"' ] Thanks. -- Sébastien Moretti SIB, Quartier Sorge - Genopode CH-1015 Lausanne, Switzerland Tel.: +41 (21) 692 4056/4221 |