Arc Forumnew | comments | leaders | submitlogin
3 points by CatDancer 5933 days ago | link | parent

"inputs" is actually a macro, so changing "inputs" will only affect code that you load after the change. (A macro works by transforming the code it is applied to, so after the code has been transformed the macro isn't used anymore).

For your first question, can you post your definition that isn't working for you?



2 points by thaddeus 5933 days ago | link

I see - I didn't know macs transformed code like that.... I just reversed the order of loading my mac's and tada - everything worked!

Thanks! T.

the hack i did turned out to work, but as requested, here it is:

    (mac x-inputs args
      `(tag (table border 0)
         ,@(map (fn ((name label len text))
                  (w/uniq (gl gt)
                    `(let ,gl ,len
                           (pr ',label ":")
                           (if (isa ,gl 'cons)
                               (do (textarea ',name (car ,gl) (cadr ,gl)
                                     (let ,gt ,text (if ,gt (pr ,gt)))(br)))
                               (do (br)(gentag input type  ',(if (is label 'password) 
                                                            'password 
                                                    'text)
                                         name ',name 
                                         size ,len 
                                         value ,text)    (br))))))
   (tuples args 4)))
)

-----