sm-discuss AT lists.ibiblio.org
Subject: Public SourceMage Discussion List
List archive
- From: "Andrew \"ruskie\" Levstik" <ruskie AT mages.ath.cx>
- To: sm-discuss AT lists.ibiblio.org
- Subject: [SM-Discuss] A new config_query
- Date: Sun, 5 Mar 2006 21:22:49 +0100
I'd like to point out that I've hacked togheter a new config_query
and is available via grimoire functions.
The reason I've did this is to facilitate the selection of multiple
choices in a list which is needed for xorg-server spell to select
various drivers and fonts.
The query is named config_query_checkbox.
It's called the same as config_query_list.
For example:
config_query_checkbox MYTESTVAR "What do you want enabled?" \
nothing everything option1 option2 option3 option4 option5
This would during the cast be shown as:
What do you want enabled?
[0] nothing
[1] everything
[2] option1
[3] option2
[4] option3
[5] option4
[6] option5
Which ones do you want[0]:
Here the user can now select...
Let's say I want option3 and option5
I type in 46 and press enter.
That will select those two options and store them into MYTESTVAR.
The data will be stored as "option3 option5" it then depends on
the guru to provide a mechanism to parse this and act on it.
My suggestion and recommendation is the use of a case statement
or where this can be done a for statement with a few ifs for specifics.
I hope others find this function usefull.
--
Andrew "ruskie" Levstik
Source Mage GNU/Linux Games grimoire guru
Geek/Hacker/Tinker
Hacker FAQ: http://www.plethora.net/%7eseebs/faqs/hacker.html
Key id = A7A9E461
Key fingerprint = 757E C16B F5B7 DC27 B003 CCED CF95 3A77 A7A9 E461
-
[SM-Discuss] A new config_query,
Andrew "ruskie" Levstik, 03/05/2006
-
Re: [SM-Discuss] A new config_query,
Andrew "ruskie" Levstik, 03/07/2006
-
Re: [SM-Discuss] A new config_query,
Eric Sandall, 03/07/2006
-
Re: [SM-Discuss] A new config_query,
Jason Flatt, 03/07/2006
- Re: [SM-Discuss] A new config_query, Sergey A. Lipnevich, 03/07/2006
- Re: [SM-Discuss] A new config_query, David Kowis, 03/07/2006
-
Re: [SM-Discuss] A new config_query,
Jason Flatt, 03/07/2006
- Re: [SM-Discuss] A new config_query, Flavien Bridault, 03/07/2006
-
Re: [SM-Discuss] A new config_query,
Arwed von Merkatz, 03/07/2006
- Re: [SM-Discuss] A new config_query, Asaru, 03/07/2006
- Re: [SM-Discuss] A new config_query, Juuso Alasuutari, 03/07/2006
- Re: [SM-Discuss] A new config_query, Mathieu L., 03/09/2006
-
Re: [SM-Discuss] A new config_query,
Eric Sandall, 03/07/2006
-
Re: [SM-Discuss] A new config_query,
Andrew "ruskie" Levstik, 03/07/2006
Archive powered by MHonArc 2.6.24.