RougeWave ObjectiveGrid - storing rows of virtual grids

T

Torsten Hensel

Hi!

I'm using ObjectiveGrid with C++ and I tried to understand the concept
of virtual grids. I created a sample application that read table
entries using GetStyleRowCol from an external source file, this worked
fine. Then I wanted to enable saving of changes. So I overloaded the
StoreStyleRowCol function to save the changed cell values back to the
file.

But this is not a reasonable behavior. This way I can only make
changes that are directly stored to the file. It is not possible to
undo changes, or discard any changes.

What I want is a behavior similar to applications like Excel: Open a
file, change some values, undo some changes. And when I exit the
application or close the file the application asks if I want to save
the file or discard the changes.

One way to realize the second requirement (ask if I should save or
not) I figured out is to make a copy of the file when loading it. Then
I work on this copy. If I close the file the program asks if I want to
save. If I do the copy is renamed to the original file name, if not it
is deleted.

This is a possible way for small files, but when I want to edit files
of size larger than some GB this is not possible anymore.

Is there a better solution? One way I think of is to store any change
in some internal data structure. Each call of StoreStyleRowCol adds
one entry in this structure. GetStyleRowCol queries this structure to
get the latest version of the data set. With this structure I can
realize a undo mechanism. But the disadvantages I see are 1.) only
limited number of changes possible (what if I change any cell of a
dataset with some billion records and many fields?) and 2.) quite
complicated to implement.

Does anyone know a better approach to implement virtual grids that
allows saving only on demand (and not each time a cell is changed) and
undoing changes?

CU, Torsten
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,159
Messages
2,570,879
Members
47,414
Latest member
GayleWedel

Latest Threads

Top