Trouble With "Enter" vs. "Tab" (Again)

David T. sunfish62 at yahoo.com
Sun Nov 13 13:55:26 EST 2011


John--

As I noted, I recognize that the dev team makes this distinction. I reiterate my question: why?

Why treat the keys differently? The onscreen behavior looks exactly the same! If I use the Enter key to go off the end of a split line, Gnucash doesn't, in fact, go to the next transaction--it goes to the next line of the split. And will keep doing that as long as there is some non-null data on the active split line. This is exactly how the Tab key works as well. If you Tab repeatedly, eventually you get taken to the next transaction, and whatever special feature associated with the Enter key is triggered anyhow. So, why have this distinction at all? 


Having the keys do the same thing onscreen, but radically different things in the software is troubling to me. How is the non-developer supposed to know that there is this difference, and how are they supposed to keep track of these differences?

I will note that the Help file (section 6.3) clearly instructs the user to use Tab when moving among the lines, and Enter to complete the transaction--but there is nothing that I could find that explicitly says: "In Gnucash, the Tab and Enter keys invoke different procedures in the software. The Tab key moves from field to field without committing the transaction and triggering Gnucash's transaction cleanup procedures. Pressing the Enter key causes Gnucash to check the transaction for integrity and ensure that the transaction follows double entry accounting principles."

I made that up, and I could be wrong, but calling the Enter process "the special undocumented behind the curtains wizardry" didn't seem helpful. 

Returning to the problem at hand, you note that using the Lots method might work, but I have found that this method leaves a lot to be desired. IIRC, once the lots have been managed through this, there doesn't seem to be any way of straightening them out later, should there have been an error in the original calculations.I can't recall the full specifics, but when I tried to clean up a mutual fund holding that predated my use of Gnucash by many years, I was thoroughly unable to get the lots to work out correctly, and I have simply left the mess until such time as I have time and heart to delve into it.


Considering further, perhaps the issue of managing capital gains would be better served by having the sale of stocks and mutual funds processed via a dialog box, triggered from a menu item under Actions (alternatively when the user chooses the SELL action in a transaction and then leaves the field, although this would undoubtedly raise the whole Tab/Enter issue again ;) ). 


The dialog box would prompt for:
1) Number of shares
2) Sale price
3) Commission (with an associated account, default set by preference/last used)
4) Account to receive proceeds (drop down account list, default set by preference/last used)

5) Gain/Loss (with an associated account, default set by preference/last used)
    Additionally, (if this makes sense) include a button to calculate Gain/Loss for you. This button would trigger a process that would allow you to choose between FIFO or LIFO calculation of gain. ISTR that there was someone wanting this functionality a couple of years ago.


[I tried to mock this up using Glade, but I found the Glade interface... challenging. I figured getting some kind of description here would be a start, anyway.]


I don't know whether I have covered the necessary options fully here, but I think this is at least a start in the right direction (at least from my perspective).

David


----- Original Message -----
From: John Ralls <jralls at ceridwen.us>
To: David T. <sunfish62 at yahoo.com>
Cc: Users Gnucash <gnucash-user at gnucash.org>
Sent: Sunday, November 13, 2011 9:30 AM
Subject: Re: Trouble With "Enter" vs. "Tab" (Again)


On Nov 12, 2011, at 10:38 PM, David T. wrote:

> As a long time user of Gnucash, I understand that the developer group makes distinctions between the "Enter" key and the "Tab" key, but once again, I have had scratch my head at this seemingly arbitrary distinction.
> 
> The circumstance that had me pulling my hair out this time was when I attempted to enter the sale of a stock with a capital gain/loss. I don't buy or sell stock often, so each time, it's an adventure.
> 
> You see, I *know* there is an oddity with this situation, but it *still* took me about 20 minutes to remember how to work Gnucash into doing what is supposed to happen. 
> 
> 
> I looked at some of my earlier transactions, and tried to follow them. Each time I entered the split for the gain/loss in the asset account, Gnucash dutifully filled in 1 share priced at the gain/loss. If I then went in and zeroed these out, Gnucash dutifully added *another* line against Imbalance-USD in the full amount.
> 
> I tried going into the transaction from one of the other accounts, but that was not successful either.
> 
> 
> Then, I went to the Concept Guide (Chapter 8.7), and looked at the description there. I found nothing of help to solve my problem.
> 
> Finally, just about ready to give up, I REMEMBERED.
> 
> On the line, as I am finishing putting in the zero share line, instead of using the Enter key, I MUST TAB OFF THE LINE.
> 
> Then--and ONLY then--does the transaction get entered the correct way.
> 
> I continue to marvel at this distinction, and I cannot fathom why it would make any difference if these two keys caused the same actions in the software. I understand that some feel that "Entering" a transaction is Something More than merely "Tabbing," but honestly, this is just a nightmare for an average user (like me).
> 
> If there Truly is a Reason for this distinction--and that reason is still relevant in 2011--then I think that both the differences and their reasons NEED TO BE DOCUMENTED IN EVERY PLACE THAT THEY OCCUR. For example, I also know that 
> Tab/Enter do different things when a user types a new account while 
> inputting transactions in the register.
> 
> This one in particular is almost unfathomable.

Only because your lead-line* is too short. ;-)

When editing a transaction, "Tab" means to move to the next field in the split, or to a new split. "Return" means that
you're done with the transaction and runs the transaction balancing code, which is what creates the imbalance split.

It's absolutely true that the method of entering a split in a stock account which doesn't affect the number of shares
is a hack and that the balancing code will over-ride it if it isn't done perfectly. You can try the "lots" method for
generating your cap gains transactions, and while it has its own irritations, it doesn't require you to remember an arcane operational distinction when editing. 

Regards,
John Ralls

* For non-sailors: A fathom is a maritime unit of measure for the depth of water. In the days before electronics, it
was measured by a weighted line called a lead-line. If the water was deeper than the line was long, then one couldn't 
measure it: It was "unfoathomable".



More information about the gnucash-user mailing list