Re: +UrlField

2008-10-18 Thread Alexander Burger
Hi Tomas,

> +UrlField is missing from lib/form.l.  Was that intended?

Oops, sorry!

The old subclass of +TextField

   (class +UrlField +TextField)

   with the derived classes

  (class +HttpField +UrlField)
  (class +MailField +UrlField)

is now a prefix class

   (class +Url)

   used by the classes

  (class +HttpField +Url +TextField)
  (class +MailField +Url +TextField)


As you can see, this is more flexible now, as you can create '+Url'
fields that are not text fields.

For example, in one application I have a numeric field that holds a port
number, and that should also be clickable. So I could define it as

   (gui '(+E/R +Url +NumField)
  '(port : home obj)
  '((P) (and (app> (: home obj) P) (mkUrl @)))
  6 )


The old +UrlField as well as the new +Url prefix take a single argument,
a function which is supposed to return the properly formatted URL. A
typical case could be

   '((Url) (pack Url "/a/b/c.l?*Arg=" (foo)))

Cheers,
- Alex
-- 
UNSUBSCRIBE: mailto:[EMAIL PROTECTED]


+UrlField

2008-10-18 Thread Tomas Hlavaty
Hi Alex,

I am switching from picoLisp-2.3.2 to picoLisp-2.3.4 and found that
+UrlField is missing from lib/form.l.  Was that intended?  I cannot
see it in CHANGES.  If it was intended, what how is it supposed to be
replaced in app code?

Thank you,

Tomas
-- 
UNSUBSCRIBE: mailto:[EMAIL PROTECTED]