Recent Changes - Search:


Ghost Data

In television, the term ghosting refers to interference resulting in a superimposed shadow image on the screen.

In the context of GUI programming we use ghost data to refer to intermediate, user maintained data associated with a GUI widget that is used to model the datas source. This ghost data is used to map the real data into the GUI.

Here's an example.

A program uses a table widget to model a database table. This requires an internal mapping of database rows to widget rows. This mapping ghosts actual data and must be kept it in sync with changes that occur either to the database or the widget.

The work involved in this synchronization can account for a lot of complexity in a GUI application. Table and tree widgets are notoriously susceptible to ghosting as they typically manage large amounts of data. Not only is the building up, keeping in sync, and tearing down of this ghost data cumbersome but it is difficult to guarantee that the mapping is always correct.

A solution to this problem is to use widgets which have built-in facilities for mapping. The BLT treeview and tabset widgets for example do this by maintaining internal symbol tables. Thus one can insert a row using a database rowid as the node name and the widget can support direct lookups and queries. This eliminates having to maintain an external mapping.

Edit - History - Print - Recent Changes - Search
Page last modified on January 11, 2010, at 10:41 AM