我尝试在Rebol嵌入式编辑器中实现save-as-ftp按钮。按钮保存的实现是这样的:
save-as-ftp: has [file-content][
file-content: t1/text
prefs-file: rejoin [_self-path %ftp.preferences.txt]
either exists? prefs-file [
prefs-ftp: construct load prefs-file; see article application configuration file
user: prefs-ftp/user
password: prefs-ftp/password
server-path: prefs-ftp/server-path
][
user: ask "User: "
password: ask/hide "Password: "
server-path: ask "Server-Path: "
]
view ftp-view: layout [
origin 10x10 space 8x4
style btn btn 140
ftp-field: text bold "" 140 center
pad 0x4
btn-enter 140 "Save" #"s" [hide-popup result: ftp-field/text]
btn red + 50 "Quit - No Save" [hide-popup quit-now]
]
file-target: result
ftp-target: rejoin [ftp:// user ":" password "@" server-path file-target]
write ftp-target file-content
print ["uploaded" file-target "to" rejoin [ftp:// "XXXXXXX" ":" "XXXXXXX" "@" server-path]]
true
]
我的问题是查看ftp-view:我甚至无法输入ftp-field文本框,因为弹出窗口失去焦点。
答案 0 :(得分:1)
hide-popup用于关闭模态窗口。 使用'inform
打开模态窗口我在这里看不到任何模态窗口。
哦..这是一个按钮或什么东西,你附加到rebol编辑器?
几年前我修改了我的编辑ftp文件......我必须看看能不能找到我做的。