<< saveafterncommands 6-1-1 soundsec >>
removed >> removed > 6-1-1 > setPreferencesValue

setPreferencesValue

設定値を設定

呼び出し手順

setPreferencesValue(xpath, key_value)
setPreferencesValue(xpath, key_value, doc)

引数

xpath

文字列, 設定ファイルのノードを取得する XPathリクエストを表す.

key_value

2xNの文字列行列, 設定するキーの値.

doc

XMLDoc型のmlist, 設定ファイルのXML文書.

説明

設定ファイル(SCIHOME+'/XConfiguration.xml') の属性の値を設定します.

誤って設定を修正するとScilabの動作を改変することになります.

docを指定した場合, 値はこの文書内で探されます. 複数のリクエストを実行する必要がある際, 同じ設定ファイルを重複してパースすることを避けるために 有用です.

有効な任意のXPathリクエストを指定できます. 例えば,proxy設定を書き込むXPathリクエストは以下のように 記述できます:

// カレントの値を取得
prev = xmlGetValues("//web/body/proxy", ["enabled", "host", "port"]);
setPreferencesValue("//web/body/proxy", ["enabled", "host", "port"; "true", "my.proxy.org", "1234"]);
// 確認します
xmlGetValues("//web/body/proxy", ["enabled", "host", "port"])
// 前の値に戻します
setPreferencesValue("//web/body/proxy", ["enabled", "host", "port" ; prev]);
xmlGetValues("//web/body/proxy", ["enabled", "host", "port"])

参照

履歴

VersionDescription
6.1.0 setPreferencesValue() declared obsolete. It is replaced with xmlSetValues().
6.1.1 setPreferencesValue() will be removed in the next Scilab version.

<< saveafterncommands 6-1-1 soundsec >>