> I would like the Telephone field to accept 8-digit numbers, which is
> common in Norway. At the moment I have to prefix with +47, otherwise I
> get "Bad phone number format".
You should change the line in the 'main' function
(locale "NO" "no")
Then, entering a number "0123 456" will show in the GUI with a leading
zero, but will be stored internally as "47 123 456". Telephone numbers
are stored internally always in this normalized format, to allow a
> How difficult would it be to create export and import functions, e.g.
> to and from tab-separated files? This could be separate utilities, i.e.
> not a part of the GUI.
That's very easy. There is a report mechanism in PicoLisp. You find
examples for that in the demo application in the "app/" directory. The
'csv' function is called there, e.g. in "sales.l" and "inventory.l".
Same with import. You can import CSV or XML (an example for the latter
is in http://picolisp.com/wiki/?osmgeodata). But each case is different,
depending on the specialities of the format at hand.
If you just want an import/export, you could use 'dump'.
(dump (db nm +Prs @@)) )
You can then do (load "adrDump.l") to read the data back.
> How about sorting the names case-insensitive? Now "Willy" comes before
> "von". For a Norwegian, it would also be nice if Å came after Ø, at
> least in a more serious application than this. I’m just curious. ;-)
The search in a QueryChart doesn't come sorted at all. The reason is
that this is an incremental search, finding things according to the
search criteria (by searching all search keys in parallel).
To be able to sort the results, you would need to first select *all* of
them, and in a non-trivial application this may be too expensive.
To get sorted output, a report again is the standard way to go. I have
lots of examples, but unfortunately they are not public ...