ファイルを開くときに、中のコードが継続する間
例
| 例: FileCachingStyle の設定 | |
{let web-page-source:Frame = {new Frame}}
{let button:CommandButton =
{new CommandButton,
label = "Choose location",
{on Action do
|| open users choice of urls, bypassing
|| the cache to make sure that we get the latest
|| version of the web page.
{if-non-null u = {choose-location} then
let s:#StringBuf
{with-file-caching-style FileCachingStyle.reload do
{with-open-streams t = {read-open u} do
|| Load the whole page, caching really takes
|| effect on opening, so this could be inside or
|| outside the with-file-caching-style call.
set s = {t.read-one-string}
}
}
{web-page-source.clear}
{web-page-source.add s}
}
}
}
}
{HBox
{text Reload a file or web page},
button,
web-page-source
}
|
注意事項