picolisp

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/picolisp.git/
Log | Files | Refs | README | LICENSE

commit 86717e716322a2dea9d0b8b094b898a7104bdd69
parent c44a6ac7d1669e836ef551ea4093e3625a96f4e4
Author: Alexander Burger <abu@software-lab.de>
Date:   Wed, 27 Feb 2013 20:09:02 +0100

Use 'placeholder' in +Cue
Diffstat:
Mlib/form.l | 21++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/lib/form.l b/lib/form.l @@ -1,4 +1,4 @@ -# 17jan13abu +# 27feb13abu # (c) Software Lab. Alexander Burger # *PRG *Top *Gui *Btn *Get *Got *Form *Evt *Lock *Spans @@ -702,31 +702,30 @@ (class +Dflt) -# cue +# dflt (dm T (Exe . @) - (=: cue Exe) + (=: dflt Exe) (pass extra) ) (dm set> (Val Dn) - (extra (or Val (eval (: cue))) Dn) ) + (extra (or Val (eval (: dflt))) Dn) ) (dm val> () (let Val (extra) - (unless (= Val (eval (: cue))) Val) ) ) + (unless (= Val (eval (: dflt))) Val) ) ) -(class +Cue +Dflt) +(class +Cue) +# cue (dm T (Str . @) - (pass super (pack "<" Str ">")) ) + (=: cue (pack "<" Str ">")) + (pass extra) ) (dm show> ("Var") (<js> - (let V (eval (: cue)) - (list - (cons "onclick" (pack "if (this.value=='" V "') this.value=''")) - (cons "onblur" (pack "if (this.value=='') this.value='" V "'")) ) ) + (cons (cons "placeholder" (: cue))) (extra "Var") ) )