Home
 +Dienstleistung
 +Programmierung
 I+C/S DB-Lösungen
 ILFreie Software
 I_+ObexTool
 I_+tkFPlot
 I_LLCD-Editor
 +Analyse/Beratung
 +Links
 +Neuigkeiten
 +Referenzen
 +Kontakt
 LSuche
Kleines Tech-EDV Logo

ObexTool plugins

Kurzlink: 0020501020plugins.php
ObexTool: How to write ObexTool-Plugins

How to write ObexTool-Plugins

Any action regarding a file depends on the corresponding file type. The file type is identified by the case-insensitive file name extension (that part of the file name which follows the last period).

To write a ObexTool plugin for a specific file type, you have to follow the tasks described below:
  • Write a tcl/tk program which includes a root-namespace which is named identical to the intended file extension in upper case.
    At least one function called default_handler MUST exist in that namespace and MUST have args as vararg-parameter

    Example: if the extension is ".vcs" (VCal organizer entry on M50), create the following plugin code:
    namespace eval ::VCS {
    variable ...
    ...
    proc default_handler { args } {
    ...
    }

The function is called with the following 6 parameters:
  1. Full path name of the file or folder
  2. File type (lowercase extension without '.' or "folder")
  3. Size (or empty, if it is a folder)
  4. File date (last modified date)
  5. User permissions (example "RWD")
  6. Group permissions (example "W")
  • Name the file identical to the file extension in lowercase, appended by an underscore and any additional naming.
    Example - assuming the same file type as mentionend in the example above:
    vcs_plugin.tcl
  • Plugins MUST be located in the plugins directory of the ObexTool and will be sourced on demand, i.e. when a file of the corresponding extension is being double-clicked or the context menu "Plugin" is activated over a plugin sensitive file.

    If a single plugin consists of several source files, the files will be read in alphabetical order. Therefore name your source files according to the intended load order.

    Example:
    smi_01init.tcl
    smi_02libs.tcl
    smi_03start.tk

Further details about ObexTool you can read on How to create and use language files.





Impressum

Tech-EDV Logo