image change notifications

Pablo d'Angelo pablo at mathematik.uni-ulm.de
Sat Jun 14 20:17:50 BST 2003


On Wed, 11 Jun 2003, Pablo d'Angelo wrote:

> which operations do we need?
> panoramaImageAdded(int imgNr);
> panoramaImageRemoved(int imgNr);
> panoramaImageChanged(int imgNr);
>   this then should be called for many images when one in the middle is
>   removed. or when images are swapped.

I have added these functions and I found some problems with them when
the Panorama changes a lot. Especially when many Images are
removed/created in one step (like loading a project or something like
that):

the Observer might expect that the reported change is the only step
that has lead to the current Panorama state, which is not true.

Example: All images have been removed from the Panorama in one step.
After that many ImageRemoved() notifications are done.
Now, assume the first ImageRemoved() wants to display another existing
image -> bang.

So we need something like the panoramaImageRemoved(set removed_images).

But when multiple addition/removals occur this might also lead to
similar problems.

Therefore I want to add one panoramaImagesChanged(pano, set changed_images)
When images have been removed/added, it can be seen from the number
of images that Panoram contains. changed_images will contain the id's
of all images that have changed and whose display has to be updated.

ciao
  Pablo
--
http://wurm.wohnheim.uni-ulm.de/~redman/
Please use PGP


More information about the ptX mailing list