
This doc is the diary of wisql development and comes in 
three sections:  a revision history with notes (1), a
bugs reported/fixed list (2), and a Requests and TODO
list (3)... happy reading.

================================================================================
RELEASES
--------------------------------------------------------------------------------
  version 1.1 - change sql input to use tk2.2 text widget.
                handle text columns a little better - break into lines.
                add getObjs to view other objects.
                allow comments '' and 'go's in sql.
                add count of all rows returned by server
  version 1.2 - change showFields to display 30 chars for field name
                using hand coded sql instead of sp_help.
                add sybmsg(msgno) to error messages.
                change .m.msg to a message (used to be a label) so that all
                the text of a message will be displayed.
                add some arrow key bindings for Entry and Text classes.
                add shift-return and control-return binding to execute sql.
                added a menu for selecting a server on signon window.
                fix pickList OK command when nothing selected.

--------------------------------------------------------------------------------
  version 1.3 - change a few things for newer versions of Tk & TclX,
                toplevel pathnames must start with lower case, wishx
                command interpreter instead of wish.
                if SYBASE environment variable is not set, check for 
                user sybase home directory in "ypcat passwd" or /etc/passwd
                make the execute button a cancel button while execing sql

The 1.3 release of sybtcl included my first enhanced wisql, which
contained the first rev of EZedit. At of that rev they were almost
identical -- except that UCO wisql had two extra features and
some trivial toplevel window appearance changes. The two extra
features were:

        you can start wisql with an arg (the arg is your sybase
        user name) -- which is useful for those like me who have
        to be several different Sybase users in the course of the
        day.  wisql sa will start wisql with the username "sa"
        already filled in.

        There's an additional item on the main buttonbar, called
        EZrpt.  If you click on it you get the late-beta version
        of my "ad hoc query" tool for the non-SQL speaker who wants
        to report on single tables.

These were  the 1.3 Rev notes:

REV LEVEL:
This version of UCO wisql should be called 1.3, since it contains
all the enhancements to Poindexter-wisql 1.3.  The Cancel Query
feature is particularly nice in this release, thanks Tom!  So you
can think of this as wisql 1.3 with just a few extra bells&whistles.
The main functional difference (not visible to the user though)
is that UCO wisql is tlib-based rather than a monolithic source.
Look at the head of the wisql script that starts the show, and
you'll see the difference.  Later versions of UCO wisql may deviate
further from standard wisql.

--------------------------------------------------------------------------------

  version 1.4 - this evolutionary stage done by De Clarke, UCO/Lick Observatory
		 UCSC.  All Clarke code copyright the Regents of the
		 University of CA 1993.

	re-worked the code from Tom's original monolithic tcl to a tlib
		with a separate executable launch script
	re-arranged toplevel menus for ease of use
	added EZedit and EZrpt, pt/clk data editing and simple report
		generation (single table only)
	added balloon help to all main windows (meta-MouseL)
	put in getFont for graceful handling of 'font not found' when
		running with old braindead X servers -- changed a couple
		of fonts to more usual sizes
	introduced new "sybNext" proc to catch errors (such as lockout) in
		a sybnext statement
	expert mode vs regular mode in wisql main;  sybase username arg on
		wisql command line
	SQL command ring buffer by T Poindexter
	wisql now accepts views as tables
	see README.1.4 for more info

	my version of sybtcl.c is hacked :
define SYB_BUFF_SIZE 100000    /* conversion buffer size for various needs*/
	(original value was 4096 bytes)
	to prevent segv when a stored proc or trigger returns too much
	text for sybmsg.  This should really be done with an malloc, but
	this is a quick bandaid.

wisql v 1.4 notes:

Additions:      EZrpt reorganized, and new EZedit tool

Changes:        Lots and lots of misc fixes

To original wisql TP code:

        changed and expanded help mechanism to ctrl-click balloon help, for
        consistency with EZrpt and EZedit and for more help text

        wisql is now modal:  run it with -x option to get Expert mode, or
        without to get regular user mode.

        Choose Table and Show Fields are two separate functions instead of
        Show Fields popping up as soon as you choose a table

        User can choose a View as a Table, and will see no difference in
        EZrpt or EZedit (Sybase lets you edit views)...

        getFont procedure added to make wisql robust on X servers without
        scaling fonts... resorts to standard MIT X11 fonts and sizes if it
        cannot get what it wants

        calls to sybnext replaced by calls to procedure sybNext, which does
        error checking for Sybase errors during the row get.

        minor look&feel tweaks enforcing consistency in buttons/menus labels,
        changing some font sizes and message aspect ratios, etc.: e.g. moved
        the QUIT button out from the File menu and onto the menubar;  fixed
        signon, wisql main, and help to pop up in predetermined consistent
        places;  fixed table, field, etc listboxes to pop up in predetermined
        consistent place (overlapping main, not off to the right);  changed
        File menu name to Query.

        ring buffer of last 10 SQL commands (from TP wosql code) Jul 93

To UCO code:

        EZrpt window completely reorganized for ease of use.

        Balloon help in EZrpt

        bugs fixed in EZrpt:  several.

        EZrpt now checks if you have select privs on table before opening
        itself up

        new tool EZedit (early beta) included, consisting of horizontal
        (multirecord) and vertical (single record) views of data, with
        ability to update, delete, insert data.  consistent look&feel
        with EZedit, same balloon help mechanism, some speed problems

        several cleanup fixes of no interest to anyone but me, to improve
        global variable management, impose consistency, etc.

        EZreport and EZedit now use the same sql RSE parser, for consistency.
        EZedit has one additional feature:  by ctrl-Mouse-2 on the FIND
        button, the user can hand-enter some SQL to select records.  Is this
        a good binding?  or should it be ctrl-s anywhere in the whole EZE
        tool?  and what about the V form?

        All buttons that would execute a SQL command now support a binding
        ctrl-mouse-3 which permits the user to see what SQL would be executed
        if that button were pressed.

        EZedit now limits the number of rows you can call up with the FIND
        button.  Users were not amused when they thoughtlessly hit FIND while
        viewing a 19,000 record table...  If the returned row count is more
        than 500 (which is still downright silly) then ezedit balks and
        gets only 100.  Same applies to auto-find after mod.  This was fixed
        August 3rd 93.

        You can now select which fields you want to view in EZedit.  The
        EZhide button in the main window menubar will call up a little
        tool which lets you turn fields "on" and "off".  This speeds up
        EZedit, if only a few fields are needed out of a long long table.
        This Hide feature gets reset each time you select a new table.
        It cannot be saved (yet) -- no interest expressed by users in
        doing so.  (Aug 25 1993)

        Since twm and other window managers selfishly appropriate all the
        good Meta-mouse bindings, I have backed off and changed my Meta
        mouseclick bindings to Control instead.  This means that HELP is
        now found by Control-Mouse-1 instead of Meta-Mouse-1 and so forth.
        For consistency's sake, Meta-P and Meta-N in the SQL window are
        now Control-P and Control-N (I doubt you ever wanted a literal
        newline in there...)  -- change made Aug 10 93.

        A serious bug was fixed in table protection sensing.  the symptom
        is that protections granted to a user are not actually sensed, so
        the user should be able to insert or update (for example) and is
        not able to.  This only happened when the tool was launched with
        no argument (username).  This was fixed Aug 10 93.

        C source is included for checking whether there is still an attached
        terminal before directing debug output to stdout.  Most users will
        never turn debug on and will never care.  If you do turn debug on
        in any routine AND you detach wisql from its parent terminal, then
        you'd better look at termCheck and logMsg and detached.c ...

        The wisql help facility and keybindings were reworked during the
        week of Sep 13th 1993, to enforce consistency, provide more
        useful and complete help, and make Fosql and Wisql work alike.
        Changes:  The magic bindings for "get it all" in main wisql window
        and for "my own SQL" in EZedit have changed.  they are both now
        Shift-Control-3.  This arcane sequence is reserved for 'expert'
        user short cuts of this kind, max 3 to a screen.  All the other
        existing bindings remain the same.  The HELP buttons in each screen
        are now all Help... menus, each with a standard set of 3 topics.
        One of the topics is a list of all the keybindings for that screen.
        This is sort of a teeny release.  1.4.2 or something like that.

        This same burst of enthusiasm altered the scrolling commands for
        EZedit (H-form).  Instead of mouse2 and mouse3, which make EZedit
	hideously inconsistent with all other tools, they are now bound
	to u and d and U and D and uparrow and shift uparrow and downarrow
	and shift downarrow and so forth.

	1.4.14 release version incorporated some major changes.

		The debug mechanism was significantly altered.  To turn
		on debugging you have to (1) replace your usual wisql.tlib
		and ucosyb.tlib with the debug versions, and (2) set the
		global variable 'debugs' in wisql to a list of the names
		of the procs that you want debug output from.

		The wisql source and fosql (forms sql package, not yet
		released) source were compared and their redundancies
		were put in ucosyb.tlib, a somewhat generalized library
		of procs for use by these two applications.

		The wisql/fosql/ucosyb sources were put under RCS.  You
		will now see RCS header info in each of the procs.

		A couple of bugs were fixed and a couple of minor new
		features added.

		The Help facility was revised and expanded.

		The Magic Key bindings (FastKeys) were revised and made
		consistent between wisql and fosql.  One of the Help
		revisions was to ensure that FastKey help is visible on
		every main screen.

		This version of wisql runs under Tcl v7, TclX v7,
		Tk 3.3.  There are incompatibilities with Tcl v6.

--------------------------------------------------------------------------------
2.0 -- UCO wisql now part of a suite, based in ucosyb.tlib
       TCL v7 compatible
       all sources under RCS for better revision control
       miscellaneous new features and bugfixes
       release timed to go with sybtcl 2.0 and Oratcl 2.0 from TP

	2.0 release version timed to coincide with T Poindexter's 2.0
	release of sybtcl and oratcl.  

		New feature in EZrpt:  user control over printed field
		widths.  As of 2.0.23 there is not yet any Help on this
		feature.

		A number of bugs introduced by the Great RCS Conversion
		and the library merge were fixed.

		New features in EZedit: proper traversal (Return and Tab)
		bindings in match values and new data values entry boxes;
		default sort order for selected records.  Proper handling
		of user-supplied quotes and apostrophes.

		more improvements to help, all incremental and not terribly
		interesting.  and a bunch of little nitpicky tweaks in
		response to user bug reports.

--------------------------------------------------------------------------------

	V3 release notes:

	This version has been hacked for compatibility with Tk4.0, and
	this conversion is not yet complete;  the tool has been made to
	work, and that's about it.  Look and feel changes are not all
	beneficial, and I hope to reverse some of them.  In general the
	Motif-iness of Tk4.0 has made widgets larger and therefore many
	original window sizes are too small;  there's too much white
	space in the more crowded windows like verticalForm.

	Most bindings should be as they were;  please report those which
	fail.  I expect to be doing a lot of patching as people report
	discrepancies between the pre-4.0 version and this one.  This 
	release was rushed out to go with the 7.4 sybtcl release from
	Tom P.

--------------------------------------------------------------------------------
	V3 release notes:

	V3 was just an emergency hack to make wisql *almost* work with
	Tk4.0.  If you have V3, lose it immediately and get V4.


--------------------------------------------------------------------------------
	V4 release notes:

	4.0

	More Tk4.0 patches, particularly a fix for the print and sort buttons
	in EZrpt which were broken by binding changes in 4.0. 

	Sybase Sys10/11 are more protective of certain systables;  chkPrivs
	had to be modified slightly (thanks Ashu for the patch) but remains
	compatible with 4.9 sybase.

	The "secure" font is history.  Password entry widget now uses -show *
	option to display asterisks for typed chars.

	started to remove the detritus of the old "tlibDoc" stuff.  probably
	will remove all the old "debugs" stuff from ucosyb.tlib as well, since
	tkinspect is the only sane way to debug tk code anyway.

	xess support not yet present in 4.0

==============================================================================
KNOWN BUGS/PROBLEMS and FIX DATES:

	when using COPY in the Vform of EZedit, NULL values get copied over
	for datetime type values.  this is bad, because then the string
	N-U-L-L is interpreted as datetime input and rejected by the server.
	the COPY operation needs to get smarter and use blank string instead
	of NULL in this case.  see below -- FIXED 

	When a table has many many fields, like more than twenty, performance
	in EZedit gets rather slow.  I don't know any fix for this at the
	moment other than a faster CPU.  Suggestions are welcome.
	WORKAROUND (Aug 25 1993) use EZhide tool. 1.4.1

	EZhide tool introduced two problems:  field 0 lost on unkeyed tables
	due to incorrect global variable initialization FIXED Aug 27 93 1.4.2

	Insert must be prohibited from EZedit when fields are hidden!
	FIXED Aug 27 93 1.4.3

	NULL values incorrectly treated in Insert and Update from EZedit:
	quoted if datatype was char/varchar/datetime/smalldatetime.
	FIXED Aug 27 93 1.4.4

	object protections incorrectly derived when object is owned by
	a dbo who is not sa (oops! thanks, jackson@stsci) FIXED Aug 30 1993
	1.4.5

	hardwired bitmap path names and executable path names turned into
	global variables set in wisql launch script: exedir and bitmapdir.
	set these to customize your installation.  Aug 30 1993 1.4.6

	wrong number of records reported retrieved and displayed in EZedit:
	fixed Aug 31 1993 1.4.7

	expert user cannot see views as tables (!) FIXED Sep 4 1993 1.4.8

	non-expert user did not see EZhide menu (!) FIXED Sep 20 1993 1.4.9

	olwm pre-v3 does not recognize the iconbitmap assignments, and
	gives all iconified wisql pieces the default "tools" bitmap.
	v3+, and twm, work OK.		NO FIX

	wisql does not adapt to varying dot-pitch displays, and only
	looks/feels right on Sun 19in monitors or Tek XP25s at this
	time.  this must be fixed soon.  Meanwhile the cheap workaround
	is to make most windows resizable. (done during Fall 93)
	
	Known bug:  in EZedit when a change value field is nulled out with
	ctrl-U the sanity checker decides that no changes have been made
	and will not permit an update.  Under investigation Oct 93.	
	PARTIAL WORKAROUND:  enter a space instead.
	
	Known problem:  wisql has a hard time figuring out how to represent
	Sybase floating point values.  Sybase tends to return many digits
	of meaningless precision (like 1.4999999999999 for 1.50) and this
	had led me to enforce some format control on numeric output;  however,
	this format control gets us in trouble with really huge integers.
	Still under consideration Sep 1995.... hack on formatCols if you need
	a quick local fix for your site, and send in your suggestions.

==============================================================================

REQUESTS and RESPONSES:	

	organize all the tlib material into one master tlib and
	resolve the difference between the wisql syb-open (only one
	pipe) and my usual multi-pipe open for other utilities
	DONE Oct 9 1993

	fix selection-paste from listboxes so that it strips braces

	fix select in Results listbox so that it gets the text into the
	public selection buffer -- annoying not to be able to paste
	from Results into mail messages etc, see below...

	make cut/paste work properly in sql window, implement primitive
		edit commands (delete selected on DEL, paste selected) and
		bind some fastkey to Clear (and to File In and Out?)
		COPY/PASTE OK July 1993.  

	resolve binding conflict between std x11 copy/paste and mouse-2
		used for h-scrolling in entry boxes. -- use mouse-3 for
		h-scrolling instead  FIXED July 1993

	use malloc in sybtcl.c, sybsql routine,  where msg buffer is 
	received from server.  current buffer size is 4096 and overflows 
	with segv/buserr when lots of PRINT statements in code that the 
	user executed from wisql
	HACKED July 1993 -- increased buffer size to 100K bytes.
	Tom's v2 sybtcl made a try at malloc, ran into problems, raised
	buffer size instead (Nov 93)

	User request:  make Vform autoscroll on Tab or Return progress
	off bottom (or top) of screen.  Can do, but not in a hurry to
	dig into it.

	User request:  make EZedit, both H and V form, able to 'hide'
	columns of very wide tables, so as to speed everything up
	during editing and browsing.  A Hide button on each column is
	requested, which would eliminate that column from the display.
	This is a very nifty suggestion but will take some thought!
	PROVIDED Aug 24 1993 -- EZhide

	User request:  direct Mail of results to some recipient?
	seems like a lot of effort for a rather wimpy feature.

	User request:  ability to transfer SQL code from "show" mode
	in EZedit (ctrl-mouse-3 on action buttons) into main win.
	DONE Oct 9 1993

	User request: Popup widget for SQL errors in fosql and wisql,
	and Mail button in widget to mail error to wisql maven.
	Under construction Oct 93 but not ready in time for 1.4.23
	release.  Prelim version Nov 93.  Still not "finished" at 2.0 
	release level, hopefully finished for 2.1.

	Ctrl-U mapped to Clear in Results listbox.  For consistency
	with other widget types.  DONE Aug 13 1993

	User request: ability in EZrpt to constrain width of printed
	fields.  Fairly trivially done by adding WIDTH entry box to
	the control panel.  Width can be constrained to less or greater
	than original, giving use a little crude formatting control.
	DONE Oct 12 93

	User request:  Title on EZrpt reports.  Sigh.  Under consideration
	for a future release.

	User request:  records to appear in consistent order in EZedit H
	window, rather than with the most recently changed records at
	the bottom.  FIXED Oct 93 by addition of Default Sort buttons, one
	per column.  One column can be chosen for default sort order and
	all records will be sorted by that col asc.  Turns out to be kind
	of a nice feature.

	User request:  option to append to Results window rather than 
	clearing each time a new command is issued.  Under construction
	for 2.1.  Surprise, DONE Dec 1 1993 at 2.0.23

	Author's initiative:  include in ucosyb.tlib a proc which will
	autodocument the package it gets called from.  Add a button to
	wisql in expert mode only, which will execute tlibDoc with the
	right args and produce a "spec sheet" on wisql.  DONE Jan 27th 94

	User request:  Option to mail query results to a recipient, directly
	from wisql.  Added Summer 1995.

	Make wisql Oracle-literate (author's initiative).  Jan 96

	Support joins (user request).  Jan 96

