home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 6 / AACD06.ISO / AACD / Utilities / MUIbase / FAQ < prev    next >
Text File  |  1998-05-16  |  6KB  |  144 lines

  1. FREQUENLY ASKED QUESTIONS
  2. =========================
  3.  
  4. ----------------------------------------------------------------------
  5. Q: How can I use Cygnus Ed as external editor?
  6.    (External editor)
  7. A: Using CygnusEd as external editor is not easy:  Inserting "ced %f"
  8.    in the requester is not enough, because CED needs a stack of 8000
  9.    bytes.  CED also detaches itself from MUIbase, so MUIbase cannot
  10.    wait for the quit of CED.  A solution is writing a script like
  11.    this:
  12.        .key file
  13.        .bra {
  14.        .ket }
  15.        ; calls CED for MUIbase
  16.        ; ---------------------
  17.        
  18.        stack 8192
  19.        CED {file} "-pubscreen=MUIbase_PubScreen" -keepio
  20.    Note that I use
  21.        MUIbase_PubScreen
  22.    as screen for MUIbase. If you use Workbench, so use
  23.        -pubscreen=Workbench
  24.    for that purpose. Save this script as
  25.        MUIBASE:CallCED
  26.    and type in the external editor field
  27.        MUIBASE:CallCED %f.
  28.  
  29. (Ralph Reuchlein [raresoft@rz.fh-augsburg.de], 18.06.1996)
  30. ----------------------------------------------------------------------
  31. Q: Why you are using (CONCAT2 "" ...)?
  32.    (String programming)
  33. A: In the beginning of programming MUIbase, I used
  34.        (CONCAT2 "" strings ...)
  35.    to concatenate strings.  Steffen told me that I have to engage my
  36.    brain and he asked me why I didn't use
  37.        (+ strings ...)
  38.    instead of above one. :-)
  39.  
  40. (Ralph Reuchlein [raresoft@rz.fh-augsburg.de], 15.04.1997)
  41. ----------------------------------------------------------------------
  42. Q: How can I make a conditional expression like C?
  43.    (C-like programming)
  44. A: To use e.g.
  45.        s=(t)?("1"):("0");
  46.    from C in MUIbase, you simply have to use
  47.        (SETQ s (IF t "1" "0"))
  48.    to get the same result.
  49.  
  50. (Ralph Reuchlein [raresoft@rz.fh-augsburg.de], 15.04.1997)
  51. ----------------------------------------------------------------------
  52. Q: Is there a way to use CygnusEd without using a script?
  53.    (External editor)
  54. A: A short solution for the CED problem is typing this one into the
  55.    external editor requester:
  56.        stack 8192<CTRL J>CED -keepio %f
  57.    The <CTRL J> is the shortcut for Line Feed (do not type the
  58.    characters as shown [:-)] ).  This is only possible, if you turned
  59.    off the item "Text gadget filter" in the "IControl preferences".
  60.  
  61. (Allan Odgaard [duff@diku.dk], 15.08.1997)
  62. ----------------------------------------------------------------------
  63. Q: How to implement AmigaBase's LOADMEMO?
  64.    (AmigaBase equals)
  65. A: To use the "LOADMEMO" function from AmigaBase in MUIbase, you
  66.    simply have to use this self defined function:
  67.        (DEFUN loadMEMO (filename:STR)
  68.          (LET ((file:FILE (FOPEN filename "r")) memo:MEMO)
  69.            (SETQ memo (FGETMEMO file))
  70.            (FCLOSE file)
  71.            memo
  72.          )
  73.        )
  74.    You might wonder, what will happen, if "(FOPEN)" fails?  Then the
  75.    variable "file" will hold "NIL".  "(FGETMEMO file)" is evaluated to
  76.    "(FGETMEMO NIL)" and returns also "NIL" and finally the complete
  77.    function returns "NIL".
  78.  
  79. (Steffen Gutmann [gutmann@informatik.uni-freiburg.de], 28.08.1997)
  80. ----------------------------------------------------------------------
  81. Q: How to make colorized text in MUIbase text objects?
  82.    (GUI related)
  83. A: To specify colors in objects like "button" or "text", you simply
  84.    have to insert a escape sequence.  The sequence has the format
  85.        <ESC>n
  86.    where "<ESC>" is the escape character and "n" is the number of the
  87.    pen.  "n" can be used in the range from 0 and 9.  In my MUI
  88.    environment, colors 0, 2, 4, 6 and 9 are the text pen; color 1, 3
  89.    and 8 are the highlight pen; color 5 is the fill pen and finally
  90.    color 7 is the background pen.  As you can see you only have 4
  91.    colors!
  92.    You are right if you say that after pressing <ESC> the window
  93.    closes.  Therefore you can use the copy'n'paste feature of the
  94.    string gadgets (if according MUI library exists) as well as the
  95.    simple keyboard shortcut <CTRL [> to write the <ESC> character into
  96.    the string gadget.
  97.    
  98.    Avoid using color sequences in Window buttons, because the window
  99.    titlebar does not replace the escape sequences and you would see
  100.    the sequence as is!
  101.    Due to the limited number of colors (only 4) in future there will
  102.    not be a direct support for colorized text in MUIbase.  So you can
  103.    use this sequences.
  104.  
  105. (Ralph Reuchlein [raresoft@rz.fh-augsburg.de], 29.01.1998)
  106. ----------------------------------------------------------------------
  107. Q: How to make styled text in MUIbase text objects?
  108.    (GUI related)
  109. A: To specify styles in objects like "button" or "text", you simply
  110.    have to insert a escape sequence.  The sequence has the format
  111.        <ESC>x
  112.    where "<ESC>" is the escape character and "x" is one of the
  113.    following characters:
  114.        n     normal style
  115.        b     bold style
  116.        i     italic style
  117.        u     underlined style
  118.    
  119.    You are right if you say that after pressing <ESC> the window
  120.    closes.  Therefore you can use the copy'n'paste feature of the
  121.    string gadgets (if according MUI library exists) as well as the
  122.    simple keyboard shortcut <CTRL [> to write the <ESC> character into
  123.    the string gadget.
  124.    
  125.    Avoid using style sequences in Window buttons, because the window
  126.    titlebar does not replace the escape sequences and you would see
  127.    the sequence as is!
  128.  
  129. (Ralph Reuchlein [raresoft@rz.fh-augsburg.de], 29.01.1998)
  130. ----------------------------------------------------------------------
  131. Q: Is there a way to have more flexible choice attributes?
  132.    (Choice attributes)
  133. A: Yes, use a string attribute, set its display object to read-only
  134.    and attach a listview to it.  Now the user can't directly enter a
  135.    string by hand but select an item from the popup listview.  The
  136.    difference to a choice attribute is that you can still change the
  137.    order of labels and the label strings itself, as in this case real
  138.    strings rather than internal numbers are stored in the records.
  139.    There are also two programming functions for getting and setting
  140.    the labels:  (GETLABELS <attr>) and (SETLABELS <attr> <string>).
  141.  
  142. (Steffen Gutmann [gutmann@informatik.uni-freiburg.de], 02.03.1998)
  143. ----------------------------------------------------------------------
  144.