The poor little pointer

There once was a little cell pointer. It was very happy in its job of pointing to cells of data in its widget the listbox. One day it had actually pointed to a whole picture. The cell pointer was very proud of this and of the certificate it had received saying what a good job it had done pointing to the picture.

The little cell pointer belonged to a listbox. Listboxes were very important. With vital user data in each cell and lots of rows and columns the little cell pointer was content. It enjoyed pointing to its cell of data with all the rest of its little buddies doing the same, it was rewarding and fun work!

Then one day a programmer incorrectly cast the little cell pointer and it saw a panel pointer, a much grander affair. The panel seemed to own all of the widgets inside, both great and small. All of its little buddies in the listbox also belonged to the panel pointer and even the big scrollbar that was always hanging around when there was lots of data, even it belonged to this panel pointer.

The cell pointer decide that one day it would grow up and be a panel pointer.

Unfortunately the little cell pointer wasn't big enough yet to handle all the elements required to be a panel pointer, and when it was asked for the value of an element it knew nothing about, the poor little cell pointer got the answer wrong. It tried really really hard, but unfortunately it couldn't satisfy the request and so the program crashed, killing the cell pointer, all of its little buddies, the panel, the window and the process!

So beware, each little cell pointer no matter how small, is supporting the entire system. If you abuse even the smallest element in your system the whole thing is likely to explode in your face.


Back