Wilcox Development Solutions Blog

First (Big) Steps Made

February 20, 2004

Since Thursday we’ve been working hard on a new project - a GUI component that also fetches some data from a remote location. Using wxWindows wxWidgets as our foundation, we’ve made really good headway in only a few days.

(More information in the extended entry…) We quickly decided that we needed to deal with putting the data onto the grid first, and worry about the look afterwards. Toward that end we wrote several classes - the first of which is PRDataSource, which gets its data from a std::map object we call PRGridData. The PRGridData uses an object called PRDataKey for its key - this allows us to refer to the elements (or PRDataCell’s) by their location on the grid.

The basic flow of the program is this: another class (PRWebIO we call it) populates PRDataSource with the data from the remote file. PRDataSource keeps an internal structure of this data (the aforementioned PRGridData) to refer to later.

WxWindows’ wxGrid class has the ability to refer to a “table” for its data. When we construct our grid object we associate it with a PRDataSource object. When the grid needs to populate a certain cell, it goes and asks the table - our PRDataSource.

Currently, our PRDataSource can display given data, as well as modify that data. We also have a suite of 32 tests to test the written functionality - 10 for the PRDataKey, 10 tests for PRDataSource, and 12 for PRDataCell.

Right now we need sample data to arrive before we can continue much further. There may be a half day or so getting the look of the wxGrid up to spec, but we’re mostly stalled here, without data.

So far, all of our development has taken place on Mac OS X using XCode which uses the gcc 3.3 compiler, however, in the near future we will compile and test the code on a Windows PC.

The Short And Sweet Version: The underlying classes to handle the data are mostly done - except of course for classes that we can’t write until we see a sample file.


Written by Ryan Wilcox Chief Developer, Wilcox Development Solutions... and other things