Page 1 of 1

wxGrid save to the file.

Posted: Mon Feb 05, 2007 11:25 pm
by sobaka
I have a problem this saving Values from wxGrid to the file. Everything seems to be fine but it

Posted: Tue Feb 06, 2007 12:37 am
by Auria
What gets printed if you do that:
for (int i = 0; i < 6; i++)
{
for (int j = 0; j < numLayers; j++)
{
fprintf(OurFile, "%s\n", (const char *)layers[j]);
printf("%s\n", (const char *)layers[j]); // <---------
}

}


Just to determine if problem is during saving or because saving is not called

Posted: Tue Feb 06, 2007 1:20 am
by sobaka
Auria wrote:What gets printed if you do that:
for (int i = 0; i < 6; i++)
{
for (int j = 0; j < numLayers; j++)
{
fprintf(OurFile, "%s\n", (const char *)layers[j]);
printf("%s\n", (const char *)layers[j]); // <---------
}

}


Just to determine if problem is during saving or because saving is not called



Nothing it's don't work show blank "DOS" window;-\

Posted: Tue Feb 06, 2007 1:28 am
by timg
Should that be

layers[j]

instead of

layers[j] ?

Posted: Tue Feb 06, 2007 1:52 am
by Auria
sobaka wrote:
Auria wrote:What gets printed if you do that:
for (int i = 0; i < 6; i++)
{
for (int j = 0; j < numLayers; j++)
{
fprintf(OurFile, "%s\n", (const char *)layers[j]);
printf("%s\n", (const char *)layers[j]); // <---------
}

}


Just to determine if problem is during saving or because saving is not called



Nothing it's don't work show blank "DOS" window;-\


Well no matter how you proceed, you should know how to print stuff on the console, or a debugger - to have an insight on what's happening

Posted: Tue Feb 06, 2007 2:14 am
by sobaka
timg wrote:Should that be

layers[j]

instead of

layers[j] ?


it's doesn’t meter it's just will store first j than i

Posted: Tue Feb 06, 2007 2:23 am
by sobaka
Auria wrote:
sobaka wrote:
Auria wrote:What gets printed if you do that:


Just to determine if problem is during saving or because saving is not called



Nothing it's don't work show blank "DOS" window;-\


Well no matter how you proceed, you should know how to print stuff on the console, or a debugger - to have an insight on what's happening

Well main problem that it's not work only with 1 layer. With 2 or more it's work perfectly.

Posted: Tue Feb 06, 2007 2:55 am
by Auria
sobaka wrote: Well main problem that it's not work only with 1 layer. With 2 or more it's work perfectly.
I still think you should dosomething to know wich i and j indexes are saved, and what they contain.
Should that be

layers[j]
instead of
layers[j] ?


it's doesn

Posted: Tue Feb 06, 2007 2:50 pm
by sobaka
Auria wrote:
sobaka wrote: Well main problem that it's not work only with 1 layer. With 2 or more it's work perfectly.
I still think you should dosomething to know wich i and j indexes are saved, and what they contain.
Should that be

layers[j]
instead of
layers[j] ?


it's doesn