Author: remi
Date: 2009-03-24 09:24:34 +0100 (Tue, 24 Mar 2009)
New Revision: 4199
Modified:
software_suite_v2/tuxware/tuxdroidserver/trunk/resources/03_advanced_api/resourceTestGadgetMessage.py
Log:
* only "message" notifications must be read with the TTS.
- Gadgets must uses throwMessage to notify messages with TTS.
- Some python gadgets don't uses SimpleGadget and throwMessage and uses
"print" without a correct formating. The effect is that these messages are not
reconized as "message" but as "notification" without valid message identifier
... Theses gadgets must be fixed ! These gadgets can uses SimpleGadget module
or the GadgetHelper class. See the last commit on "tuxdroid-gadget-system"
updated with the GadgetHelper class.
- The string formating through throwMessage is the standard since many month
...
Modified:
software_suite_v2/tuxware/tuxdroidserver/trunk/resources/03_advanced_api/resourceTestGadgetMessage.py
===================================================================
---
software_suite_v2/tuxware/tuxdroidserver/trunk/resources/03_advanced_api/resourceTestGadgetMessage.py
2009-03-23 21:49:41 UTC (rev 4198)
+++
software_suite_v2/tuxware/tuxdroidserver/trunk/resources/03_advanced_api/resourceTestGadgetMessage.py
2009-03-24 08:24:34 UTC (rev 4199)
@@ -21,8 +21,6 @@
self.fileName = RESOURCE_FILENAME
def start(self):
- eventsHandler.register(ST_NAME_FW_GADGET_NOTIFICATION,
- self.__onGadgetNotification)
eventsHandler.register(ST_NAME_FW_GADGET_MESSAGE,
self.__onGadgetMessage)
eventsHandler.register(ST_NAME_FW_GADGET_STARTING,
@@ -32,21 +30,6 @@
# Private methods
#
--------------------------------------------------------------------------
- def __onGadgetNotification(self, *args):
- spl = args[0].split(":")
- gadgetUuid = spl[0]
- instanceUuid = spl[1]
- gadgetTtsLocutor = spl[2]
- gadgetTtsPitch = spl[3]
- notificationType = spl[4]
- text = ""
- for line in spl[5:]:
- if len(text) > 0:
- text += " "
- text += line
- resourceTTS.stackPush(text, gadgetTtsLocutor, int(gadgetTtsPitch),
- gadgetUuid)
-
def __onGadgetMessage(self, *args):
spl = args[0].split(":")
gadgetUuid = spl[0]
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn