Why can't I hide input with 'ask/hide'?
Started by Rex on 5-Jan-2014/6:47:03-8:00
Rex — 5-Jan-2014/6:47:03-8:00
I use Saphir R3, and cannot mask the input with "ask/hide". There is a script error: "input has no refinement called hide". This is weird because "/hide" should be legitmate for "ask", at least it is written as such in the function's description. Has anyone ever had the same problem? or I just made a grammar mistake?
Nick — 5-Jan-2014/20:56:40-8:00
The /hide refinement hasn't been implemented yet in R3.
David den Haring — 6-Jan-2014/17:14:59-8:00
In my build of R3, the hide refinement for the ask function is defined, but is not yet supported by the function -- input.
Type "source ask" to see the code.
Rex — 6-Jan-2014/20:12:52-8:00
Got it, thanks :-) By the way, is there any other refinements that are not yet implemented?
Nick — 7-Jan-2014/9:26:56-8:00
I just remembered randomly seeing that one in the recent past. You may want to check out http://www.codeconscious.com/rebol/r2-to-r3.html for a nice list of differences between R2 and R3. I covered some differences between basic R2 VID and R3-GUI at http://business-programming.com/business_programming.html#section-18.3
Nick — 7-Jan-2014/11:01:12-8:00
I created a new post (R2 and R3 differences)
Rex — 7-Jan-2014/20:01:07-8:00
Thanks, Nick. Although I cannot understand some of the topics there (http://www.codeconscious.com/rebol/r2-to-r3.html),I find it a great reference :-)
Nick — 12-Jan-2014/13:03:59-8:00
BTW,
A quick solution is to use a GUI field widget with the 'hide property set to true:
load-gui
guie/styles/field/facets/hide-input: true
view [field]
Nick — 12-Jan-2014/14:05:18-8:00
Or better, create your own 'password widget:
stylize [
password: field [
facets: [hide-input: true]
]
]
view [
password
password
password
]
Nick — 13-Jan-2014/11:39:49-8:00
For example:
do %r3-gui.r3
stylize [password: field [facets: [hide-input: true]]]
view [
p: password
button "Save" on-action [
write %pass x: get-face p
alert join "Saved: " x
]
]
view [
text "Here's what was written to the 'pass.txt' file:"
area (read/string %pass)
]
Arie — 14-Jan-2014/13:29:11-8:00
Hi, is the R3 download on the Saphirion website always the latest available build?
Nick — 14-Jan-2014/14:43:24-8:00
Yes, for Saphir build, and there should be some new releases in the next few weeks.
Reply