progress 機能
=============
NTEncoding 1.1 で新しく追加した API です。
:code2uni(code, def, option), :uni2code(str, def, option) の引数 option で
次の slot を指定できるようになりました。
progressScript: func(count, totalCount)... // 処理状況を表示するスクリプト
progressStep: 100, // progressScript を実行する間隔(初期値=1)
※ progress 機能をサポートしていない変換モジュールではこの機能は無視されます。
ex.
local bin := "適当にデータを入れてね(^_-)-☆";
local opts :=
{
closebox: nil,
icon: nil,
statusText: "Test",
gauge: 0,
titleText "One moment, pleaseÉ",
};
local fn := func (contextView)
begin
nte:code2uni(bin, '|base64:GNUE|, {
progressStep: 2,
progressScript:
func(count, totalCount)
begin
opts.gauge := count * 100 div totalCount;
contextView:SetStatus('vGauge, opts);
end});
end; // workFunc
doProgress('vgauge, opts, fn);
---
(c)1997 GNUE.
Tags: Newton