跳轉到內容

Rebol 程式設計/編輯器

來自華夏公益教科書,開放的書籍,開放的世界
EDITOR file /app app-word 

(未記錄)

EDITOR 是一個函式值。

  • 檔案 -- (型別:任何)
  • /app
    • app-word -- (型別:任何)

原始碼

[編輯 | 編輯原始碼]
editor: func [file /app app-word /local tmp][
    either link? [
        if block? ctx-edit [
            ctx-edit: context either all [
                value? 'fileset-files? 
                tmp: fileset-files? 'desktop 
                find tmp %desktop/edit.r 
                tmp: load/header link-root/desktop/edit.r
            ] [next tmp] [ctx-edit]
        ] 
        either app [ctx-edit/view-file/app file app-word] [ctx-edit/view-file file]
    ] [
        either exists? tmp: view-root/desktop/scripts/edit.r [do/args tmp file] [
            if block? ctx-edit [ctx-edit: context ctx-edit] 
            ctx-edit/view-file file
        ]
    ]
]
華夏公益教科書