On 3 Aug 1999, Rob Browning wrote:
> Alexandru Harsanyi <[EMAIL PROTECTED]> writes:
>
> > (make_valid_name): this function checks whether the name has some
> > non-whitespace characters in it. it trims the leading and trailing
> > whitespace and returns a new string. It is used as a check for user
> > entered data in gnc_ui_accWindow_create_callback, but it can be used
> > elsewhere too.
>
> What are the restrictions on account names, and what are the
> justifications for those restrictions? I know there was a restriction
> on length, which it would be nice if we could avoid, but isn't a
> really big deal, but what else and why?
Curently the user can enter " " as the account name. Although the
gnucash will work perfectly with this name, it will be hard to make a
difference between a transaction that has no destination account and a
transaction that has " " as the destination account.
Also I thought that " some_name", "some_name " and "some_name" should
represent the same name for the same reasons as above.
>
> I suppose it might make sense to disallow duplicate names, but that's
> about all I can think of, and that's mostly helpful for the scripting
> side. In the GUI, even if you end up with duplicate names, you can
> still see two entries (though why you'd ever want that, I can't
> imagine).
I originally planed to check for uniquess of the account name, but later I
realised that in fact the account code should uniquely identify the
account. I have the following account chart for my finances:
...
Expenses
|
\Iune
| |
| \Taxes
| ...
\July
|
\Taxes
...
I know this is not perfect, but I like it and I use it. I would not like
it to become broke when account is imposed to have unique names.
So I thought that an unique account code should be imposed for each
account. I planned to add the code to the account creation dialog, but
realized that in fact the gnucash engine should impose all the
restrictions, since even if gnucash allows to enter only valid data, one
can write a script that does anything.
best regards,
alex.
----- %< -------------------------------------------- >% ------
The GnuCash / X-Accountant Mailing List
To unsubscribe, send mail to [EMAIL PROTECTED] and
put "unsubscribe gnucash-devel [EMAIL PROTECTED]" in the body