wxGrid save to the file. Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
sobaka
Knows some wx things
Knows some wx things
Posts: 35
Joined: Mon Jan 08, 2007 2:43 am

wxGrid save to the file.

Post by sobaka »

I have a problem this saving Values from wxGrid to the file. Everything seems to be fine but it
Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Post 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
sobaka
Knows some wx things
Knows some wx things
Posts: 35
Joined: Mon Jan 08, 2007 2:43 am

Post 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;-\
timg
Earned some good credits
Earned some good credits
Posts: 148
Joined: Mon Jan 23, 2006 6:52 pm

Post by timg »

Should that be

layers[j]

instead of

layers[j] ?
Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Post 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
sobaka
Knows some wx things
Knows some wx things
Posts: 35
Joined: Mon Jan 08, 2007 2:43 am

Post 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
sobaka
Knows some wx things
Knows some wx things
Posts: 35
Joined: Mon Jan 08, 2007 2:43 am

Post 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.
Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Post 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
sobaka
Knows some wx things
Knows some wx things
Posts: 35
Joined: Mon Jan 08, 2007 2:43 am

Post 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
Post Reply