W3C home > Mailing lists > Public > www-amaya-dev@w3.org > November 2002

TtaSetTextContent not working as expected?

From: Aguido Horatio Davis <horatio@qpsf.edu.au>
Date: Thu, 28 Nov 2002 10:30:02 +1000 (EST)
To: <www-amaya-dev@w3.org>
Message-ID: <Pine.LNX.4.33.0211281009050.12975-100000@reduce.qpsf.edu.au>


G'day,

This fragment of my code:

  int locallen = 512;
  char localbuf[512];
  TtaGiveTextContent(target, localbuf, &locallen, &lang);
  printf("debug: ...from text '%s'\n", localbuf);
  TtaSetTextContent(target, cevt->argv[0], lang, doc);
  printf("debug: ...to text '%s'\n", cevt->argv[0]);
  TtaGiveTextContent(target, localbuf, &locallen, &lang);
  printf("debug: ...result: '%s'\n", localbuf);

gives the output:

debug: ...from text 'Browsing and authoring are integrated seamlessly. You
can browse and edit Web pages at the same time. To make editing easier, a
simple click in Amaya moves the caret and allows text input; to follow a
link, you have to double click. This behavior can be changed as well as many
other features using the Special/Preferences menu.'
debug: ...to text 'Browsing and authoring are almost integrated seamlessly.
You can browse and edit Web pages at the same time. To make editing easier,
a simple click in Amaya moves the caret and allows text input; to follow a
link, you have to double click. This behavior can be changed as well as many
other features using the Special/Preferences menu.'
debug: ...which should be 'Browsing and authoring are integrated seamlessly.
You can browse and edit Web pages at the same time. To make editing easier,
a simple click in Amaya moves the caret and allows text input; to follow a
link, you have to double click. This behavior can be changed as well as many
other features using the Special/Preferences menu'

lang has the result of calling TtaGetDefaultLanguage() in it, cevt->argv[0]
has the proper null-terminated text in it. The code fragment is inside a GTK
idle function (which is supposed to listen for events from other instances
of Amaya and echo them locally) which runs every 25ms or so. The
TtaSetTextContent call isn't changing the text element's content as I
expected it would. What am I not seeing that would explain this? Help?

Horatio
Received on Wednesday, 27 November 2002 19:35:54 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:25:48 UTC