acet-ui-m-get-names
(acet-ui-m-get-names argumentList)
This function provides extended user-input
functionality similar to (getkword), but allows multiple.keyword
selection.
argumentList is a
single list providing detailed parameters : (allowSpace prompt
keywords)
allowSpace : T/NIL
to allows input of space character(s) by user (same as in
(getstring) function)
prompt : string to
be displayed at commandline (same as in (getstring)
function)
keywords : list of
keywords to be used (similar to (initget) function, which uses a
flat string instead)
Return : a list of
matching keywords, always in uppercase notation
If no matching key is found, a message is
printed to commandline, and input query is repeated;
empty input always finishes the query,
returning NIL.
User can enter multiple keywords, separated by
"," colon; wildcards can be used with each key, in answer
string;
this function then checks each entered keyword
against the keyword list, and matching keyword(s) are added to
result list
examples :
(setq lst (list "aaa" "bbb" "ccc"))
(acet-ui-m-get-names (list
nil "\n* aaa bbb ccc : " lst))
=> space input finishes input
=> input : a* returns '("AAA")
=> input : aaa returns '("AAA")
=> input : * returns
'("AAA" "BBB" "CCC")
=> input : a*,bbb returns '("AAA"
"BBB")
(setq lst (list "a1" "a2" "a3"))
(acet-ui-m-get-names (list T
"\n* a1 a2 a3 : " lst))
=> space input is allowed
=> input : a* returns '("A1" "A2"
"A3")
=> input : *3 returns '("A3")
© Bricsys NV. All rights reserved. |