[GRASS-dev] Announcing Signal class for wxGUI

Dear devs,

I would like to announce new code for wxGUI as I promised before.

It is a new Python library which will be used in wxGUI. The purpose of
the library is to provide mechanism for communication between objects
in wxGUI. The library consists of two parts: the Signal API which will
be used in wxGUI and 3rd party package PyDispatcher which does the
hard work.

In short, simple function calls are not sufficient in the GUI, event
driven and large environment with many persistent objects because
using simple function calls would lead to tightly coupled code. Thus,
some better mechanism is needed such as Observer design pattern. Anna
and I decided to use Signal system which is similar to Signals used in
PyQt and other frameworks. As the underlying library, we have chosen
PyDispatcher because it provides very general API which enables to
implement Signal API, wide and robust functionality which makes
implementation and use of Signals easier.

All the details are described in the documentation, so please, if you
are interested, read it in the code or in the doxygen documentation.

Vaclav

You can generate and view the new documentation using:

cd lib/python/pydispatch
svn up
make htmldox-single
your-browser html/index.html &

Tomorrow or the day after, the documentation should be available at these links:

http://grass.osgeo.org/programming7/pydispatch.html
http://grass.osgeo.org/programming7/signal_8py.html
http://grass.osgeo.org/programming7/classpython_1_1pydispatch_1_1signal_1_1Signal.html

or via rsync:

rsync -r --delete --times --links grass.osgeo.org::grass7progman grass7progman

Hi,

2013/3/15 Vaclav Petras <wenzeslaus@gmail.com>:

In short, simple function calls are not sufficient in the GUI, event
driven and large environment with many persistent objects because
using simple function calls would lead to tightly coupled code. Thus,
some better mechanism is needed such as Observer design pattern. Anna
and I decided to use Signal system which is similar to Signals used in
PyQt and other frameworks. As the underlying library, we have chosen
PyDispatcher because it provides very general API which enables to
implement Signal API, wide and robust functionality which makes
implementation and use of Signals easier.

it's reasonable approach, thanks for hard work!

Martin

--
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa