Introduction to 'acetutil' functions

The acetutil modules (acetutil.arx, acetutil*.fas) provide a number of utility functions which can be called from LISP.

This documentation covers all functionality present in version 1.37 of acetutil.arx, along with a few functions provided in acetutil.fas. Functions that do not have a specific library designation appear in acetutil.arx.

Last updated on June 24, 2000.


acet-str-find

This function uses the following definitions for regular expressions:

. | Matches any single character.
* | Postfix. Preceeding item 0 or more times.
+ | Postfix. Preceeding item 1 or more times.
^ | Matches empty string at beginning of text.
$ | Matches empty string at end of text.
[chars] | Matches any character in the given class. If the first character is ^, match any character not in the given class. A range of character may be specified by first-last, as in [A-Z] to specify upper case alphabetic characters.
\( | Mark the beginning of a subexpression.
\) | Mark the end of a subexpression.
\digit | Matches a repeat of the text matched earlier by the subexpression inside the nth opening parenthesis. Subexpressions may also be referenced in replace strings.


acet-str-format

Example

The call:
(acet-str-format "%1/%2 or %2/%1." "one" "two")
will return the string:
"one/two or two/one."


acet-str-replace

This function uses the following definitions for regular expressions:

. | Matches any single character.
* | Postfix. Preceeding item 0 or more times.
+ | Postfix. Preceeding item 1 or more times.
^ | Matches empty string at beginning of text.
$ | Matches empty string at end of text.
[chars] | Matches any character in the given class. If the first character is ^, match any character not in the given class. A range of character may be specified by first-last, as in [A-Z] to specify upper case alphabetic characters.
\( | Mark the beginning of a subexpression.
\) | Mark the end of a subexpression.
\digit | Matches a repeat of the text matched earlier by the subexpression inside the nth opening parenthesis. Subexpressions may also be referenced in replace strings.


acet-ui-message

 The following type flags are available:
Base types
   0 = Acet:OK
   1 = Acet:OKCANCEL
   2 = Acet:ABORTRETRYIGNORE
   3 = Acet:YESNOCANCEL
   4 = Acet:YESNO
   5 = Acet:RETRYCANCEL
Icons
  16 = Acet:ICONSTOP
  32 = Acet:ICONQUESTION
  48 = Acet:ICONWARNING
  64 = Acet:ICONINFORMATION
Default buttons
   0 = Acet:DEFBUTTON1
 256 = Acet:DEFBUTTON2
 512 = Acet:DEFBUTTON3
 768 = Acet:DEFBUTTON4

 1 = Acet:IDOK
 2 = Acet:IDCANCEL
 3 = Acet:IDABORT
 4 = Acet:IDRETRY
 5 = Acet:IDIGNORE
 6 = Acet:IDYES
 7 = Acet:IDNO
 8 = Acet:IDCLOSE
 9 = Acet:IDHELP


acet-ui-progress

If no parameters are provided, the progress meter is removed.

Return Values

The return value depends on the action performed:
  1. Initialize: returns T if successful, otherwise NIL.
  2. Update: returns current.
  3. Restore: returns NIL.

Example

  ;;  init meter
  (acet-ui-progress "Working:" (length theList))
  ;;  process each item
  (foreach item theList
    ;;  perform action
    (doSomethingTo item)
    ;;  update meter by one item
    (acet-ui-progress -1)
  )
  ;;  kill meter
  (acet-ui-progress)


acet-ui-status

If no parameters are provided, the dialog is hidden.