home *** CD-ROM | disk | FTP | other *** search
EPOC OPL Source | 2000-10-04 | 2.6 KB | 81 lines |
-
-
- REM !--REMEMBER--!
- REM !--RENAME THE TRANSLATED FILE TO filename.nmx--!
-
- REM \System\Apps\NodeMap\NMX\Dummy.nmx.opl
- REM A Default NodeMap eXtension for NodeMap 0.6,
- REM Can be used as a reasonable template file for NMXs.
- REM See NMX.hlp file (Extension Help on Tools menu) for
- REM Further details.
-
- REM First procedure MUST be called NMXRun. It seems
- REM sensible to ensure that the NMX is running under
- REM NodeMap, so we call a special procedure called
- REM TestP: which does nothing other than confirm it's
- REM there.
- REM If the procedure cannot be found, we show a message
- REM Saying that it must be run from NodeMap
-
- PROC NMXRun:
- LOCAL XName$(60),XVersion$(4),XAuthor$(60)
- XNAME$="Dummy NMX" : REM Replace values
- XVersion$="1.0" : REM With details of
- XAuthor$="Dave Eggleston" : REM your NMX.
- ONERR ErrHandler::
- TestP:
- ONERR OFF
- gIPRINT("NMX: "+XName$+" "+XVersion$+" by "+XAuthor$)
- NMXMain:
- Return
- ErrHandler::
- ONERR OFF
- NMXError:
- ENDP
-
- REM All NMXs must include the following procedure. It
- REM informs NodeMap as to whether the extension will
- REM process multiple selections - return 1 for yes and 0
- REM for no. If it *does* handle multiple selections,
- REM You'll need to use the globals MultiSelectOn% and
- REM MultiSelect%(8999). The first tells you whether a
- REM multiple selection has been made, the array tells
- REM which nodes to work on. Essentially, if a node with
- REM an ID of N&1007 (say) has been selected, then
- REM MultiSelect%(7) will be set to 1 - ie the index is
- REM the numeric node ID minus 1000.
-
- PROC NMXHandleMulti%:
- RETURN 1
- ENDP
-
- PROC NMXError:
- dINIT "Information"
- dTEXT "This is an NMX File",""
- dTEXT "It can only be run from",""
- dTEXT "NodeMap on the Tools/",""
- dTEXT "Extensions menu item",""
- dBUTTONS "Continue",13
- DIALOG
- STOP
- ENDP
-
- REM Here the NMXMain: procedure simply fires off a dialog
- REM then returns to NMXRun:, which stops execution.
- REM Replace everything between PROC NMXMain: and ENDP with
- REM your code, and add other procedures beneath as
- REM Required. All procedure names should, as a matter of
- REM good practice, be prefixed with NMX to avoid any
- REM conflicts with NodeMap's internal procedures.
-
- PROC NMXMain:
- dINIT "Dummy Node Map eXtension"
- dTEXT "Does nothing of any interest.",""
- dTEXT "See Extension Help for an",""
- dTEXT "explanation of NMX files.",""
- dBUTTONS "Continue",13
- DIALOG
- ENDP
-
-
-