denemo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Denemo-devel] A nasty gotcha.


From: Richard Shann
Subject: [Denemo-devel] A nasty gotcha.
Date: Mon, 24 Nov 2008 16:56:08 +0000

I have come across a nasty gotcha trying to create an input mode using a
script.
The way these work is that the script starts a new gtk main loop; when
the sought for input arrives the loop is ended and control returns to
the script.
You can put this script as the action of a menu item and all is well.
This all works fine until you try to make the script also cope with the
situation where the script is already running. Then it continues to be
ok, provided you do not put it in a menu item. You can exercise the
script from the scheme window, but once you have launched it from the
menu further attempts to launch the same script do not result in the
script being launched. The reason is, I think, that you have not
returned from the handler of the first signal on the menu item - you are
in a new gtk main loop - and it seems it will not respond to further
signals, or signals are no longer sent, for the widget.
I am not sure about a solution. Perhaps the script should just register
its interest in the input concerned and return, with the script only
really starting after the arrival of the input needed.
Richard






reply via email to

[Prev in Thread] Current Thread [Next in Thread]