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: David Kowis <dkowis AT shlrm.org>
  • To: sm-discuss AT lists.ibiblio.org
  • Subject: Re: [SM-Discuss] Idea for improvement of config_query_multi
  • Date: Wed, 02 Jun 2010 19:28:38 -0500

Top posting so you don't have to scroll

+1 WANT

David

On 6/2/2010 7:10 PM, 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)"
>
> We could then use the parentheses as "field delimiters", such that when
> populating WACKY_OPTIONS with the selected choices we use a simple regex
> to strip any optional comments, leaving only the bare word in the
> variable for the script to use.
>
> If this seems like a good idea and people can (somewhat?) agree on
> parentheses as good delimiters, then I'll hack this up and submit it.
>
> I decided to post here first rather than bugzilla because I figured this
> would get the most readership/review, and the change would also require
> updates to the grimoire spellwriting documentation in addition to the
> actual real_config_query_multi function.
>
>

Attachment: signature.asc
Description: OpenPGP digital signature




Archive powered by MHonArc 2.6.24.

Top of Page