[racket] textarea-input keys

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Tue Jun 28 10:41:17 EDT 2011

I'm about to update with this too.

Jay

2011/6/27 Shogo Yamazaki <moquo2.718 at gmail.com>:
> Thanks for your reply, Jay.
> Also the "initial-value" key is useful for me,
> but I don't know if it is correct to write so.
>
> Shogo Yamazaki
> moquo2.718 at gmail.com
>
> 2011/6/28 Jay McCarthy <jay.mccarthy at gmail.com>:
>> I've just updated the Web server with docs and tests for that new
>> version. There's no reason not to have "attributes", it was just an
>> oversight.
>>
>> Jay
>>
>> 2011/6/27 Shogo Yamazaki <moquo2.718 at gmail.com>:
>>> Hi.
>>> I'm now reading article about using formlets in
>>> 'Continue: Web Applications in Racket' and trying to use formlets.
>>> It's very exciting!
>>>
>>> There is a #:attributes key with text-input, therefore
>>> I can use HTML5 attributes with text-boxes.
>>> On the other hand, textarea-input has only #:rows and #:cols keys,
>>> so I defined my-textarea-input below.
>>>
>>> I wonder why it doesn't support #:attributes by default.
>>> Or is there any other smart way?
>>>
>>> Thanks.
>>>
>>> Shogo Yamazaki
>>> moquo2.718 at gmail.com
>>>
>>>
>>> (define (my-textarea-input
>>>         #:rows [rows #f]
>>>         #:cols [cols #f]
>>>         #:attributes [attrs empty]
>>>         #:initial-value [iniv ""])
>>>  (make-input
>>>   (lambda (n)
>>>     (list 'textarea
>>>           (list* (list 'name n)
>>>                  (append
>>>                   (filter list?
>>>                           (list (and rows (list 'rows (number->string rows)))
>>>                                 (and cols (list 'cols (number->string cols)))))
>>>                   attrs))
>>>           iniv))))
>>> _________________________________________________
>>>  For list-related administrative tasks:
>>>  http://lists.racket-lang.org/listinfo/users
>>>
>>
>>
>>
>> --
>> Jay McCarthy <jay at cs.byu.edu>
>> Assistant Professor / Brigham Young University
>> http://faculty.cs.byu.edu/~jay
>>
>> "The glory of God is Intelligence" - D&C 93
>>
>



-- 
Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University
http://faculty.cs.byu.edu/~jay

"The glory of God is Intelligence" - D&C 93



Posted on the users mailing list.