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: flux <flux AT sourcemage.org>
  • To: sm-discuss AT lists.ibiblio.org
  • Subject: Re: [SM-Discuss] Idea for improvement of config_query_multi
  • Date: Thu, 3 Jun 2010 17:01:00 +0900

Jaka Kranjc (smgl AT lynxlynx.info) wrote [10.06.03 16:45]:
> 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"

This wouldn't provide _optional_ comments though (just the ability for
empty ones), so it would be changing the present function call syntax
more (a more visible change to developers who use the function, though
it would require less parsing but possibly more actual code).

So we have 2 options here then. On one hand, we introduce as little
change as possible. On the other, we make config_query_multi uniform
with optional_depends, thus going for uniformity of the calling
syntaxes (though note that optional_depends is not uniform with other
config_query_ calls [they all have *required* comments, except for
config_query_option, which has one required and two that depend on the
mechanics of the particular spell as to optionality], so it would still
be non-uniform unless we change those too).

Personally I see less visible change to the end-users (the grimoire
developers) as the better route, and it wouldn't take much code to make
the change. However, since we have two options, let the comments roll!
:)

--
Justin "flux_control" Boffemmyer
Cauldron wizard and general mage
Source Mage GNU/Linux
http://www.sourcemage.org

Attachment: pgp6x1O2p0aNo.pgp
Description: PGP signature




Archive powered by MHonArc 2.6.24.

Top of Page