Skip to Content.
Sympa Menu

sm-discuss - Re: [SM-Discuss] Idea for improvement of config_query_multi

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Jaka Kranjc <smgl AT lynxlynx.info>
  • To: sm-discuss AT lists.ibiblio.org
  • Subject: Re: [SM-Discuss] Idea for improvement of config_query_multi
  • Date: Thu, 3 Jun 2010 09:47:30 +0200

On Thursday 03 of June 2010 02:10:37 flux wrote:
> I had an idea about a way to add optional comment "fields" to
> config_query_multi choice selection. I'll reference an end-user example
> first.
>
> Current implementation:
> Which mmworp would you like?
> [0] secret
> [1] foo
> [2] bar
> [3] blarg
> You can select multiple choices by simply entering the proper numbers
> and/or chars.
> Select your choices? [ 0]
>
> Idea of new implementation:
> Which mmworp would you like?
> [0] secret (something you're not supposed to know)
> [1] foo (the standard)
> [2] bar (hmmm.... interesting...)
> [3] blarg (NOT WANT)
> You can select multiple choices by simply entering the proper numbers
> and/or chars.
> Select your choices? [ 0]
>
> The ability to put arbitrary text after a choice will greatly enable a
> user to know what they are choosing without having to expend too much
> effort in looking it up (at least if they still need to look it up,
> they'll have a better idea of where to look).
>
> I grepped over the grimoire (only the main grimoire) and found no
> instances of anything other than bare words for the choices. If an array
> item is properly quoted, it can contain spaces (and of course other
> characters), so I thought that encoding the new way as follows might
> work well for us:
>
> config_query_multi WACKY_OPTIONS "Which mworp would you like?" \
> "secret (something you're not supposed to know)"
> "foo (the standard)"
> "bar (hmm.... interesting...)"
> "blarg (NOT WANT)"
I suggest a more optional_depends like approach, to avoid extra parsing:
config_query_multi WACKY_OPTIONS "Which mworp would you like?" \
secret "something you're not supposed to know" \
obvious "" \
bar "hmm.... interesting..." \
blarg "NOT WANT"

LP
--
We cannot command nature except by obeying her. --Sir Francis Bacon
Have a sourcerous day! www.sourcemage.org

Attachment: signature.asc
Description: This is a digitally signed message part.




Archive powered by MHonArc 2.6.24.

Top of Page