Yep. Got it. That's about what I'd settled on---though without thinking about the security implications.
Does something have to be allowed for forms.l to work? I'm getting '*Get [::1] not allowed'. And I'm still stumped about '"@doc/form/refD.html" -- Open error: Permission denied' without sudo. I very much appreciate all the help! Sent from ProtonMail Mobile On Sun, Jun 21, 2020 at 9:57 PM, Alexander Burger <a...@software-lab.de> wrote: > Hi all, > >> OK, thanks, It isn't worth trying to modify the reader. I'll just add the >> decimal point while processing the input. > > It is not a good idea to use the Lisp reader in a GUI. Imagine what a > malicious > user can do with read macros! She could enter things like > `(call "sh" "-c" "rm -r *"). > > So, yes, the input needs to be handled as strings. You could check what the > PicoLisp GUI does (also in PilBox apps on Android) in "@lib/form.l". The code > for a fixpoint input field is: > > (class +FixField +numField) > > (dm T (N . @) > (=: scl N) > (pass super) ) > > (dm txt> (Val) > (format Val (: scl) *Sep0 *Sep3) ) > > (dm set> (Val Dn) > (super (format Val (: scl) *Sep0 *Sep3) Dn) ) > > (dm val> () > (let S (super) > (format > (or (sub? *Sep0 S) (pack S *Sep0)) > (: scl) > *Sep0 > *Sep3 ) ) ) > > The relevant line here is the 4th in the 'val>' method. > > ☺/ A!ex > > -- > UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe