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)))

- Alex
  • +UrlField Tomas Hlavaty
    • Re: +UrlField Alexander Burger

Reply via email to