For years now I've been using 'grok' as an address book
application.  However, as I've upgraded my OS, grok has
become less and less stable (to be fair, I haven't been
recompiling it along the way, so it's probably not grok's
fault...).

Over Christmas vacation I decided to write a replacement
using Unicon and ivib - in part to become more familiar
with ivib's widgets (which I did, thanks in no small
part to the help from you folks on the Unicon mailing
list!) and in part because I haven't done any Icon/Unicon
coding for a bit...

Attached is a screenshot from the resulting program.
The top half is a 'view' into the database.  The default
view is all addresses, the view in the image comes
from searching for all addresses in the 'Business'
category.  The bottom half is a 'display/edit/search'
tool - right now it's displaying details on the
selected address in the view.

The addressbook itself is a table in a relational
database (PostgreSQL) accessed using Unicon's ODBC
support via the 'Database' class from the 'unilib'
library.

I won't post the code here, as it's fairly long - plus
there are plenty of better addressbook applications
out there.  However, if you want to see the Unicon code
for your own amusement, it's all in the unilib libraries
at:

   http://tapestry.tucson.az.us/unicon

The 'main' program can be found under the samples link
while the principal classes (AddressGui and AddressDB)
are under the library link.  (Alternatively, you
can download the source directly from the cvs repository
by following the CVS link.)

My thanks to those of you who gave me guidance in using
the ivib widgets!

(As always, suggestions and improvements are welcome.)
-- 
Steve Wampler -- [EMAIL PROTECTED]
The gods that smiled on your birth are now laughing out loud.

<<attachment: abook.png>>

Reply via email to