The problem is:
HTML htmlChatArea = new HTML();
//bla-bla-bla
htmlChatArea.getHTML(htmlChatArea.getHTML() + newChatMessage );
So, as uoy can see I keep old value ot htmlChatArea and print new
messages
When new message arrives to HTML, because of
htmlChatArea.getHTML(htmlChatArea.getHTML() + newChatMessage );
text disappears and then appears again.
So User see how htmlChatArea becomes blank and then old and new
messages appears there.
What can I do to put this thing away?
I don't want my chat to twinkle (flicker)
On 24 Sep., 11:37, "Serega.Shey...@gmail.com"
Which browser are you using? It could be worth tweaking the settings.
We use Opera in our customer facing machines and that has lots of
options for controlling how things refresh.
On Sep 24, 10:37 am, "Serega.Shey...@gmail.com"
Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.8.1.7) Gecko/
20070914 Firefox/2.0.0.7
and Internet Explorer 6.0
The HTML works the same in these browsers.
Text disappears - blank HTML - text appears.
Looks like it is flickering...
The problem is, that I have to APPEND text to HTML, not TO SETHTML.
This explains a technique to do what you're suggesting in an efficient
way.
Ryan
On Sep 24, 8:03 am, "Serega.Shey...@gmail.com"
I am trying to develop chat.
Ajax isn't the greatest for having the server send events to the
client. Have a look at solutions identified as Comet. Basically you
send a call to the server which hangs until an event (or chat message)
arrives. Then it returns. The problem here is that every client takes
up one thread on the server so it doesn't scale too big. Although
Gpokr/Kdice have scaled to 1500 threads with this technique. The
optimal solution is to use some advanced IO to release threads and
hold connections. It gets a little complicated and I'll try to address
it at http://www.gwtapps.com at some point. Also, the book Google Web
Toolkit Applications has a chapter on building an instant messenger
(chat) using events. It's out Dec 7.
Ryan
On Sep 24, 9:16 am, "Magno Machado" <magn...@gmail.com> wrote:
> Firstly, sorry, I know I am not answering your question.
>
> I am trying to develop chat.
>
> I am planning to implement a chat in a app I'm developing with GWT and I
> would like to know how does your app know when someone post a new message.
> Are your checking the chat server for new messages, or there is any way to
> make the server notify the chat when a new message was posted?
>
> If the former, it doesn't generate an overhead?
>
> 2007/9/24, Serega.Shey...@gmail.com <Serega.Shey...@gmail.com>:
the problem is I can't make ScrollPanel for this Composite.
That's terrible, Composite grows and grows, but I want to put it on
fixed panel with Scroll Bars.
How can i do that?
I've tried to remake your class.
My vwrsion extended VerticalPanel
And then I add Vertical Panel with ability to add HTML with message to
ScrollPanel. But it doesn't work...
Please, help =(
On 24 сент, 16:24, Ryan Dewsbury <r...@rdews.com> wrote:
Now, it has been solved.
You've wrote great example
On 25 сент, 11:42, "Serega.Shey...@gmail.com"
On Sep 25, 3:42 am, "Serega.Shey...@gmail.com"