home *** CD-ROM | disk | FTP | other *** search
/ Megahits 4 / MegaHits_Vol.4.iso / mui / dev / e / amiga-e / readme < prev   
Encoding:
Text File  |  1994-10-24  |  7.7 KB  |  189 lines

  1.  
  2.                          INTRODUCTION
  3.                          ~~~~~~~~~~~~
  4.  
  5.    The original files for Amiga-E programmer that came with the
  6. developer archive of MUI 2.1 (mui21dev.lha) are not very usefull.
  7.    The muimaster.m file, that should define the functions of the
  8. muimaster.library, does this only for the functions of MUI 1.4
  9. and the mui.e file is only a very very bad replacement for the
  10. mui.h file that C programmer could use!
  11.  
  12.    Thats why I created my own MUI-AmigaE-interface. This archive
  13. (as a replacement of the original Amiga-E drawer of the mui21dev
  14. archive) contains nearly all what's needed to write MUI-programs
  15. in E and some additional informations in this file! The only
  16. "extra" you need (to use the macrofiles) is the program "Mac2E".
  17.  
  18.  
  19.  
  20.                           THE FILES
  21.                           ~~~~~~~~~
  22.  
  23. "ReadMe" - This file. Please read the entire file before mailing
  24.    me something like: "This files are creating only errors, what
  25.    make I wrong?" There are some special problems with MUI and
  26.    Amiga-E which can cause big trouble :-( Go on reading and
  27.    don't make this faults :-)
  28.  
  29. "Modules/muimaster.m" - This file defines the functions of the
  30.    muimaster.library. Copy it to EMODULES: and write
  31.    "MODULE 'muimaster'" in your source to use it.
  32.  
  33. "Modules/libraries/mui.m" - This file (and the next one) contain
  34.    the most definitions of the mui.h file that came for C
  35.    programmer with the developer archive of MUI 2.1. Use this C
  36.    mui.h file with its comments to get more information about
  37.    this definitions!
  38.       In this mui.m module all CONSTs and the structs (OBJECTs)
  39.    which are of interest for E programmer, are defined.  To see
  40.    which structs are in this module, use the ShowModule-tool that
  41.    came with the E compiler. Therefore all OBJECTs are collected
  42.    at the beginning of the module.
  43.       The CONSTs are written exactly the same way as in the mui.h
  44.    file (with lowercase letters - that is no problem as long as
  45.    the two first are uppercase, even if the E-language-descrip-
  46.    tion says that CONSTs have to be totaly uppercase!) So it's no
  47.    problem to use this files even if you have used the macrofile
  48.    that came with "Mac2E" until now. 
  49.       The identifiers of the OBJECTs are written totaly
  50.    lowercase!!
  51.       Copy this file to EMODULES:libraries/ and write
  52.    "MODULE 'libraries/mui'" in your source to use it.
  53.  
  54. "MacroFiles/mui.e" - This file contains the most macro defini-
  55.    tions of the mui.h file which are, caused by the limitations
  56.    of E, not in the file above. Only "the most", because some of
  57.    them couldn't be translated to E, but they are not very
  58.    important.
  59.       To use this file and its macrodefinitions you need the
  60.    program "Mac2E", and if you use a version >= 3 of "Mac2E"
  61.    you first have to create the pre-analysed macrofile which is
  62.    not included in this archive.
  63.       As a result of moving the CONSTs to the E-module-file
  64.    mui.m above, instead of using only one macrofile like the one
  65.    that came with "Mac2E", it's possible to write MUI programs
  66.    *without* using this macrofile and "Mac2E", but I wouldn't do
  67.    so!!! With this macrofile it's possible to write MUI programs
  68.    in E nearly the same way as in C.
  69.       The more interesting advantage of puting the CONSTs in a
  70.    E-module is the much more readable source after using "Mac2E".
  71.    Sometimes - not often, but sometimes - it's better to search
  72.    an error in the source that is created by "Mac2E" and than
  73.    it's better to read "MUIA_String_Contents" instead of
  74.    "$80428FFD".
  75.       The macronames are written the same way as the C originals
  76.    in mui.h - with one exception: The macro "String" is renamed
  77.    to "StringMUI" to avoid conflicts with the E-Function String()
  78.       Copy this file to ... where you want it - for example in a
  79.    MacroFiles-directory in your Amiga-E-directory.
  80.  
  81. "Sources/doMethod.e" - To write MUI programs, you need a DoMethod
  82.    function. Because this function is part of the amiga.lib,
  83.    which we don't have as E programmer (until now), you have to
  84.    write your own one, or better use this one.
  85.       Copy it to your source to use it and look at the demo-
  86.    source "Sources/MUI_Demo.e" to see, how to use it.
  87.  
  88. "Source/installhook.e" - Sometimes - for example if you use
  89.    PopUps - you need hooks. This source gives you a PROC that
  90.    makes it very easy to install the needed hook-structures.
  91.    Look at this source (the comments) and the demo-source
  92.    "Sources/PopUp.e" to see, how to use it.
  93.  
  94. "Source/MUI-Demo.e" - This is a translation of the C demo-source
  95.    "MUI-Demo.c" that came with MUI. Use it to see, how to write
  96.    MUI-programms in E and where are the differences between C
  97.    and E.
  98.  
  99. "Source/PopUp.e" - This is a translation of the demo-source
  100.    "PopUp.c" that came with MUI. Use it to see, how to use the
  101.    installhook-PROC.
  102.  
  103.  
  104.  
  105.                      PROBLEMS WITH MUI AND E
  106.                      ~~~~~~~~~~~~~~~~~~~~~~~
  107.  
  108.                        TRUE=1 or TRUE=-1
  109.                        -----------------
  110.  
  111.    In C TRUE has the value 1 but in E TRUE has the value -1.
  112. That can cause problems, therefore a CONST "MUI_TRUE" with
  113. value 1 is defined in "Modules/libraries/mui.m". Use this
  114. instead of TRUE whenever you want to give TRUE to MUI. See
  115. "Sources/MUI_Demo.e" and "Sources/PopUp.e"
  116.  
  117.  
  118.                     Problem with SetAttrsA()
  119.                     ------------------------
  120.  
  121.    Whenever you try to set an attribut to the value it allready
  122. has, MUI overwrites this attribut in the taglist with TAG_IGNORE
  123. to make shure that notify-class don't react on it. This is
  124. nessesary to prevent endless-notification-loops. As long as you
  125. are a C programmer and use SetAttr() that is no problem, because
  126. then MUI changes only a *copy* of the original-datas of the
  127. SetAttrs()-call. But if you use SetAttrsA(), as we must do
  128. because SetAttrs() is a function of amiga.lib, it is a problem!
  129. You only give a PTR to the original-datas with SetAttrsA() and
  130. now MUI changes this *original*-datas. If you than uses this
  131. datas again, they are still changed and nothing (TAG_IGNORE)
  132. will happen. One possible way to avoid this problem is, to make
  133. the attribut a non-constant data. Instead of
  134.  
  135.    SetAttrsA(obj, [ MUIA_..., value, ..., TAG_DONE])
  136.  
  137. write
  138.  
  139.    SetAttrsA(obj, [ var + MUIA_..., value, ..., TAG_DONE])
  140.                    ~~~~~~~
  141. with var=0. Now everytime this SetAttrsA()-call is executet, the
  142. attribute is again "evaluated" and stored in the list.
  143.    Because of that I have defined the macros set() and nnset()
  144. in "MacroFiles/mui.e" this way and if you want to use them you
  145. have to DEFine a global(!) variable setAttrsA in your source
  146. and set it to 0 (DEF setAttrsA=0) !!!
  147.    BTW: x:=[...]; SetAttrsA(obj,x); SetAttrsA(obj,x) has *NOT*
  148. the wished result! 
  149.  
  150.  
  151.                           TAG_IGNORE,0,
  152.                           -------------
  153.  
  154.    Some of the macros in "MacroFiles/mui.e" are ending with
  155. "[ TAG_IGNORE,0,". That seems to be superfluous but it is
  156. needed, because in E if you want to split a statement over
  157. several lines, you can't end a line with "[" but with a comma.
  158. (See program "OptiMUI" that cames with "Mac2E")
  159.  
  160.  
  161.  
  162.                    AUTHORS (AND COPYRIGHTS)
  163.                    ~~~~~~~~~~~~~~~~~~~~~~~~
  164.  
  165. Stefan Stuntz: - MUI with mui.h and the original C versions of
  166.                  MUI-Demo.e and PopUp.e
  167.  
  168. Lionel Vintenat: - Mac2E
  169.  
  170.  
  171. Wouter van Oortmerssen: - Amiga-E
  172.                         - doMethod.e
  173.                         - installhook.e
  174.  
  175. Jan Hendrik Schulz: - muimaster.m
  176.                     - mui.m
  177.                     - mui.e
  178.                     - translations of MUI-Demo and PopUp to E
  179.                     - this ReadMe-file
  180.    (To contact me: schulzj@eva.fmi.uni-passau.de  or
  181.                    schulzj@kirk.fmi.uni-passau.de )
  182.  
  183.  
  184.  
  185.                             FUTURE
  186.                             ~~~~~~
  187.  - With future versions of MUI this files will be included.
  188.  
  189.