home *** CD-ROM | disk | FTP | other *** search
/ PSION CD 2 / PsionCDVol2.iso / Programs / 618 / NodeMapSIS.sis / NodeMap1.03.sis / Dummy.nmx.opl (.txt) < prev    next >
Encoding:
EPOC OPL Source  |  2000-10-04  |  2.6 KB  |  81 lines

  1.  
  2.  
  3. REM        !--REMEMBER--!
  4. REM        !--RENAME┬áTHE┬áTRANSLATED┬áFILE┬áTO┬áfilename.nmx--!
  5.  
  6. REM        \System\Apps\NodeMap\NMX\Dummy.nmx.opl
  7. REM        A Default NodeMap eXtension for NodeMap 0.6,
  8. REM        Can be used as a reasonable template file for NMXs.
  9. REM        See NMX.hlp file (Extension Help on Tools menu) for
  10. REM        Further details.
  11.  
  12. REM        First procedure MUST be called NMXRun.  It seems
  13. REM        sensible to ensure that the NMX is running under
  14. REM        NodeMap, so we call a special procedure called
  15. REM        TestP: which does nothing other than confirm it's 
  16. REM        there.
  17. REM        If the procedure cannot be found, we show a message
  18. REM        Saying that it must be run from NodeMap
  19.  
  20. PROC NMXRun:
  21.     LOCAL XName$(60),XVersion$(4),XAuthor$(60)
  22.     XNAME$="Dummy NMX"                            : REM        Replace values
  23.     XVersion$="1.0"                                    : REM        With details of
  24.     XAuthor$="Dave Eggleston"                : REM        your NMX.
  25.     ONERR ErrHandler::
  26.     TestP:
  27.     ONERR OFF
  28.     gIPRINT("NMX: "+XName$+" "+XVersion$+" by "+XAuthor$)
  29.     NMXMain:
  30.     Return
  31.     ErrHandler::
  32.     ONERR OFF
  33.     NMXError:
  34. ENDP
  35.  
  36. REM     All NMXs must include the following procedure.  It
  37. REM     informs NodeMap as to whether the extension will
  38. REM     process multiple selections - return 1 for yes and 0
  39. REM     for no.  If it *does* handle multiple selections,
  40. REM     You'll need to use the globals MultiSelectOn% and
  41. REM     MultiSelect%(8999).  The first tells you whether a
  42. REM     multiple selection has been made, the array tells
  43. REM     which nodes to work on.  Essentially, if a node with
  44. REM     an ID of N&1007 (say) has been selected, then
  45. REM     MultiSelect%(7) will be set to 1 - ie the index is
  46. REM   the numeric node ID minus 1000.
  47.  
  48. PROC NMXHandleMulti%:
  49.     RETURN 1
  50. ENDP
  51.  
  52. PROC NMXError:
  53.     dINIT "Information"
  54.     dTEXT "This is an NMX File",""
  55.     dTEXT "It can only be run from",""
  56.     dTEXT "NodeMap on the Tools/",""
  57.     dTEXT "Extensions menu item",""
  58.     dBUTTONS "Continue",13
  59.     DIALOG
  60.     STOP
  61. ENDP
  62.  
  63. REM        Here the NMXMain: procedure simply fires off a dialog
  64. REM        then returns to NMXRun:, which stops execution.
  65. REM        Replace everything between PROC NMXMain: and ENDP with
  66. REM        your code, and add other procedures beneath as
  67. REM        Required.  All procedure names should, as a matter of
  68. REM        good practice, be prefixed with NMX to avoid any
  69. REM        conflicts with NodeMap's internal procedures.
  70.  
  71. PROC NMXMain:
  72.     dINIT "Dummy Node Map eXtension"
  73.     dTEXT "Does nothing of any interest.",""
  74.     dTEXT "See Extension Help for an",""
  75.     dTEXT "explanation of NMX files.",""
  76.     dBUTTONS "Continue",13
  77.     DIALOG
  78. ENDP
  79.  
  80.  
  81.