doesn't take numbers

James LewisMoss jimdres@mindspring.com
31 Jul 2001 02:13:59 -0400


>>>>> On Mon, 30 Jul 2001 22:33:35 -0700 (PDT), James Lund <jiml@stanford.edu> said:

 >> Can you email me the first 10 or so lines of your xml file?
 >> Especially the xml bit containing "gnc:count-data"?
 >>
 >> @James LewisMoss <dres@debian.org> | Blessed Be!

 James> I set up one set of accounts, couldn't enter money, and then
 James> set up a second set after re-starting.  Here are the sections
 James> from both files:

 James> --------------

 James> <?xml version="1.0"?> <gnc-v2> <gnc:count-data
 James> cd:type="account">100</gnc:count-data> <gnc:account
 James> version="2.0.0">
 James>   <act:name>Assets</act:name> <act:id
 James>   type="guid">b186162bf02717468e2bbdf31edec717</act:id>
 James>   <act:type>ASSET</act:type> <act:currency>
 James>     <cmdty:space>ISO4217</cmdty:space>
 James>     <cmdty:id>USD</cmdty:id>
 James>   </act:currency> <act:currency-scu>100</act:currency-scu>
 James>   <act:description>Assets</act:description>
 James> </gnc:account>

 James> ----------------

 James> <?xml version="1.0"?> <gnc-v2> <gnc:count-data
 James> cd:type="account">82</gnc:count-data> <gnc:count-data
 James> cd:type="transaction">6</gnc:count-data> <gnc:account
 James> version="2.0.0">
 James>   <act:name>Assets</act:name> <act:id
 James>   type="guid">3115489e321cc65c2600663be1346664</act:id>
 James>   <act:type>ASSET</act:type> <act:currency>
 James>     <cmdty:space>ISO4217</cmdty:space>
 James>     <cmdty:id>USD</cmdty:id>
 James>   </act:currency> <act:currency-scu>100</act:currency-scu>
 James>   <act:description>Assets</act:description>
 James> </gnc:account>

 James> ----------------

 James> Gnucash also doesn't let me enter numbers during the account
 James> set-up initial balance phase.  When I enter a number and hit
 James> the 'Next' button, it pops an error message saying something
 James> like 'Not a valid number' when I have entered just digits.

Very strange.  It's like your sscanf isn't working for some reason.

Can you run the following through "gcc -o foo foo.c"

------------foo.c-----------------
#include <stdio.h>

int
main(int argc, char **argv)
{
   const char *test_str = "100";
   long long int test_value;
   int num_read;

   if(sscanf(test_str, "%lld%n", &test_value, &num_read) < 1) {
      printf("sscanf failed\n");
   }
   else {
      printf("sscanf good\n");
   }
   return 0;
}
----------------------------------

Obviously without the ---'s.  And then run foo and see if you get a
good message.

Also what os?  What os version?  And where did you get your gnucash
rpm?

Thanks
Jim

-- 
@James LewisMoss <dres@debian.org>      |  Blessed Be!
@    http://jimdres.home.mindspring.com |  Linux is kewl!
@"Argue for your limitations and sure enough, they're yours." Bach