Memo autoscroll and chat application

classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|

Memo autoscroll and chat application

jhonny thio
Hi, i have some question...

1. I want to build a chat application. So I have a window with textarea and textfield.
   But i have some problem. Every i add a new line to my text area, the text area doesn't auto scroll..
   How to make textarea autoscroll? 
   The other problem is i can't clear the text in the textfield (I use command textfield.setValue("")). So every
   I press enter, I want to clear the textfield and move the value to the textarea. But the textfield can't
   be cleared. Hot to clear the textfield value?

2. Are there any qooxdoo chat application in the internet ?

Thank you very much
  


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Memo autoscroll and chat application

thron7
jhonny thio wrote:
> Hi, i have some question...
>
> 1. I want to build a chat application. So I have a window with
> textarea and textfield.
>    But i have some problem. Every i add a new line to my text area,
> the text area doesn't auto scroll..
>    How to make textarea autoscroll?

Try <textarea>.setOverflow("auto").

>    The other problem is i can't clear the text in the textfield (I use
> command textfield.setValue("")). So every
>    I press enter, I want to clear the textfield and move the value to
> the textarea. But the textfield can't
>    be cleared. Hot to clear the textfield value?

See
http://demo.qooxdoo.org/current/apiviewer/#qx.ui.form.TextField~value.
You might want to toggle "liveUpdate" when you encounter an Enter key
and send a synthetic key event to force the change. Or you use
.getInputElement() and manipulate the input element directly.

>
> 2. Are there any qooxdoo chat application in the internet ?

None that I'm aware of!?

Thomas

>
> Thank you very much
>  
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> ------------------------------------------------------------------------
>
> _______________________________________________
> qooxdoo-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>  


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Memo autoscroll and chat application

Petr Kobalíček
Hi,

I thing that thron7 is right, setting liveUpdate property to true can help you with this

<textfield>.setLiveUpdate(true);

Consider using HtmlEmbed instead of text area, text area can display only text ;-)

2008/7/15 thron7 <[hidden email]>:
jhonny thio wrote:
> Hi, i have some question...
>
> 1. I want to build a chat application. So I have a window with
> textarea and textfield.
>    But i have some problem. Every i add a new line to my text area,
> the text area doesn't auto scroll..
>    How to make textarea autoscroll?

Try <textarea>.setOverflow("auto").

>    The other problem is i can't clear the text in the textfield (I use
> command textfield.setValue("")). So every
>    I press enter, I want to clear the textfield and move the value to
> the textarea. But the textfield can't
>    be cleared. Hot to clear the textfield value?

See
http://demo.qooxdoo.org/current/apiviewer/#qx.ui.form.TextField~value.
You might want to toggle "liveUpdate" when you encounter an Enter key
and send a synthetic key event to force the change. Or you use
.getInputElement() and manipulate the input element directly.

>
> 2. Are there any qooxdoo chat application in the internet ?

None that I'm aware of!?

Thomas

>
> Thank you very much
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> ------------------------------------------------------------------------
>
> _______________________________________________
> qooxdoo-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Memo autoscroll and chat application

jhonny thio
In reply to this post by jhonny thio
I have tried <textarea>.setOverflow("auto"), but this command doesn't work.

Maybe I must tell again about my problem...
Every I pressed enter in my textfield, the textfield.value will move to textarea.
If the textarea.value has bigger than the textarea size, will be shown a scroll bar.
My problem is although there is a scroll bar, but the focus of the textarea still in a first line..
so if I want read the newest line, I must scroll manual the focus to the the most bottom line.

so how I can make my textarea always focus to the new line?

----- Original Message ----
From: Petr Kobalíček <[hidden email]>
To: qooxdoo Development <[hidden email]>
Sent: Tuesday, July 15, 2008 12:09:58 PM
Subject: Re: [qooxdoo-devel] Memo autoscroll and chat application

Hi,

I thing that thron7 is right, setting liveUpdate property to true can help you with this

<textfield>.setLiveUpdate(true);

Consider using HtmlEmbed instead of text area, text area can display only text ;-)

2008/7/15 thron7 <[hidden email]>:
jhonny thio wrote:
> Hi, i have some question...
>
> 1. I want to build a chat application. So I have a window with
> textarea and textfield.
>    But i have some problem. Every i add a new line to my text area,
> the text area doesn't auto scroll..
>    How to make textarea autoscroll?

Try <textarea>.setOverflow("auto").

>    The other problem is i can't clear the text in the textfield (I use
> command textfield.setValue("")). So every
>    I press enter, I want to clear the textfield and move the value to
> the textarea. But the textfield can't
>    be cleared. Hot to clear the textfield value?

See
http://demo.qooxdoo.org/current/apiviewer/#qx.ui.form.TextField~value.
You might want to toggle "liveUpdate" when you encounter an Enter key
and send a synthetic key event to force the change. Or you use
.getInputElement() and manipulate the input element directly.

>
> 2. Are there any qooxdoo chat application in the internet ?

None that I'm aware of!?

Thomas

>
> Thank you very much
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> ------------------------------------------------------------------------
>
> _______________________________________________
> qooxdoo-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Memo autoscroll and chat application

thron7
jhonny thio wrote:

> I have tried <textarea>.setOverflow("auto"), but this command doesn't
> work.
>
> Maybe I must tell again about my problem...
> Every I pressed enter in my textfield, the textfield.value will move
> to textarea.
> If the textarea.value has bigger than the textarea size, will be shown
> a scroll bar.
> My problem is although there is a scroll bar, but the focus of the
> textarea still in a first line..
> so if I want read the newest line, I must scroll manual the focus to
> the the most bottom line.
>
> so how I can make my textarea always focus to the new line?

Ah, now I'm getting at it ... try to set scrollTop = scrollHeight with
every update on your TextArea.

T.

>
> ----- Original Message ----
> From: Petr Kobalíček <[hidden email]>
> To: qooxdoo Development <[hidden email]>
> Sent: Tuesday, July 15, 2008 12:09:58 PM
> Subject: Re: [qooxdoo-devel] Memo autoscroll and chat application
>
> Hi,
>
> I thing that thron7 is right, setting liveUpdate property to true can
> help you with this
>
> <textfield>.setLiveUpdate(true);
>
> Consider using HtmlEmbed instead of text area, text area can display
> only text ;-)
>
> 2008/7/15 thron7 <[hidden email]
> <mailto:[hidden email]>>:
>
>     jhonny thio wrote:
>     > Hi, i have some question...
>     >
>     > 1. I want to build a chat application. So I have a window with
>     > textarea and textfield.
>     >    But i have some problem. Every i add a new line to my text area,
>     > the text area doesn't auto scroll..
>     >    How to make textarea autoscroll?
>
>     Try <textarea>.setOverflow("auto").
>
>     >    The other problem is i can't clear the text in the textfield
>     (I use
>     > command textfield.setValue("")). So every
>     >    I press enter, I want to clear the textfield and move the
>     value to
>     > the textarea. But the textfield can't
>     >    be cleared. Hot to clear the textfield value?
>
>     See
>     http://demo.qooxdoo.org/current/apiviewer/#qx.ui.form.TextField~value
>     <http://demo.qooxdoo.org/current/apiviewer/#qx.ui.form.TextField%7Evalue>.
>     You might want to toggle "liveUpdate" when you encounter an Enter key
>     and send a synthetic key event to force the change. Or you use
>     .getInputElement() and manipulate the input element directly.
>
>     >
>     > 2. Are there any qooxdoo chat application in the internet ?
>
>     None that I'm aware of!?
>
>     Thomas
>
>     >
>     > Thank you very much
>     >
>     >
>     >
>     ------------------------------------------------------------------------
>     >
>     >
>     -------------------------------------------------------------------------
>     > This SF.Net email is sponsored by the Moblin Your Move
>     Developer's challenge
>     > Build the coolest Linux based applications with Moblin SDK & win
>     great prizes
>     > Grand prize is a trip for two to an Open Source event anywhere
>     in the world
>     > http://moblin-contest.org/redirect.php?banner_id=100&url=/
>     <http://moblin-contest.org/redirect.php?banner_id=100&url=/>
>     >
>     ------------------------------------------------------------------------
>     >
>     > _______________________________________________
>     > qooxdoo-devel mailing list
>     > [hidden email]
>     <mailto:[hidden email]>
>     > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>     >
>
>
>     -------------------------------------------------------------------------
>     This SF.Net email is sponsored by the Moblin Your Move Developer's
>     challenge
>     Build the coolest Linux based applications with Moblin SDK & win
>     great prizes
>     Grand prize is a trip for two to an Open Source event anywhere in
>     the world
>     http://moblin-contest.org/redirect.php?banner_id=100&url=/
>     <http://moblin-contest.org/redirect.php?banner_id=100&url=/>
>     _______________________________________________
>     qooxdoo-devel mailing list
>     [hidden email]
>     <mailto:[hidden email]>
>     https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> ------------------------------------------------------------------------
>
> _______________________________________________
> qooxdoo-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>  


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Memo autoscroll and chat application

jhonny thio
In reply to this post by jhonny thio
I have tried : this._TextArea.setScrollTop(this._TextArea.getScrollHeight()); in every I update my textarea.

this is my code :

reqOpen.addEventListener("completed", function(e)
        {
            var isi = this._TextArea.getValue();
            isi = isi + "\n" +mySentence+"\n"+ e.getData().getContent();
             this._TextArea.setValue(isi);   
             this._TextArea.setScrollTop(this._TextArea.getScrollHeight());
        }, this);

it doesn't work. any other step ?

----- Original Message ----
From: thron7 <[hidden email]>
To: qooxdoo Development <[hidden email]>
Sent: Wednesday, July 16, 2008 2:32:57 AM
Subject: Re: [qooxdoo-devel] Memo autoscroll and chat application

jhonny thio wrote:

> I have tried <textarea>.setOverflow("auto"), but this command doesn't
> work.
>
> Maybe I must tell again about my problem...
> Every I pressed enter in my textfield, the textfield.value will move
> to textarea.
> If the textarea.value has bigger than the textarea size, will be shown
> a scroll bar.
> My problem is although there is a scroll bar, but the focus of the
> textarea still in a first line..
> so if I want read the newest line, I must scroll manual the focus to
> the the most bottom line.
>
> so how I can make my textarea always focus to the new line?

Ah, now I'm getting at it ... try to set scrollTop = scrollHeight with
every update on your TextArea.

T.

>
> ----- Original Message ----
> From: Petr Kobalíček <[hidden email]>
> To: qooxdoo Development <[hidden email]>
> Sent: Tuesday, July 15, 2008 12:09:58 PM
> Subject: Re: [qooxdoo-devel] Memo autoscroll and chat application
>
> Hi,
>
> I thing that thron7 is right, setting liveUpdate property to true can
> help you with this
>
> <textfield>.setLiveUpdate(true);
>
> Consider using HtmlEmbed instead of text area, text area can display
> only text ;-)
>
> 2008/7/15 thron7 <[hidden email]
> <mailto:[hidden email]>>:
>
>    jhonny thio wrote:
>    > Hi, i have some question...
>    >
>    > 1. I want to build a chat application. So I have a window with
>    > textarea and textfield.
>    >    But i have some problem. Every i add a new line to my text area,
>    > the text area doesn't auto scroll..
>    >    How to make textarea autoscroll?
>
>    Try <textarea>.setOverflow("auto").
>
>    >    The other problem is i can't clear the text in the textfield
>    (I use
>    > command textfield.setValue("")). So every
>    >    I press enter, I want to clear the textfield and move the
>    value to
>    > the textarea. But the textfield can't
>    >    be cleared. Hot to clear the textfield value?
>
>    See
>    http://demo.qooxdoo.org/current/apiviewer/#qx.ui.form.TextField~value
>    <http://demo.qooxdoo.org/current/apiviewer/#qx.ui.form.TextField%7Evalue>.
>    You might want to toggle "liveUpdate" when you encounter an Enter key
>    and send a synthetic key event to force the change. Or you use
>    .getInputElement() and manipulate the input element directly.
>
>    >
>    > 2. Are there any qooxdoo chat application in the internet ?
>
>    None that I'm aware of!?
>
>    Thomas
>
>    >
>    > Thank you very much
>    >
>    >
>    >
>    ------------------------------------------------------------------------
>    >
>    >
>    -------------------------------------------------------------------------
>    > This SF.Net email is sponsored by the Moblin Your Move
>    Developer's challenge
>    > Build the coolest Linux based applications with Moblin SDK & win
>    great prizes
>    > Grand prize is a trip for two to an Open Source event anywhere
>    in the world
>    > http://moblin-contest.org/redirect.php?banner_id=100&url=/
>    <http://moblin-contest.org/redirect.php?banner_id=100&url=/>
>    >
>    ------------------------------------------------------------------------
>    >
>    > _______________________________________________
>    > qooxdoo-devel mailing list
>    > [hidden email]
>    <mailto:[hidden email]>
>    > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>    >
>
>
>    -------------------------------------------------------------------------
>    This SF.Net email is sponsored by the Moblin Your Move Developer's
>    challenge
>    Build the coolest Linux based applications with Moblin SDK & win
>    great prizes
>    Grand prize is a trip for two to an Open Source event anywhere in
>    the world
>    http://moblin-contest.org/redirect.php?banner_id=100&url=/
>    <http://moblin-contest.org/redirect.php?banner_id=100&url=/>
>    _______________________________________________
>    qooxdoo-devel mailing list
>    [hidden email]
>    <mailto:[hidden email]>
>    https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> ------------------------------------------------------------------------
>
> _______________________________________________
> qooxdoo-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Memo autoscroll and chat application

Jonathan Weiß
Hi Jhonny!


The problem is that the "scrollTop" property is applied on the widget's div element. At the moment we have no getter or setter for the "scrollTop" or "scrollLeft" property of htmlarea elements.
As workaround you can set the value on the htmlarea directly (here for qooxdoo 0.7.x):

this._TextArea.getElement().firstChild.scrollTop = 200;


Cheers,
Jonathan

-----Original Message-----
From: [hidden email] on behalf of jhonny thio
Sent: Wed 7/16/2008 4:24 PM
To: qooxdoo Development
Subject: Re: [qooxdoo-devel] Memo autoscroll and chat application
 
I have tried : this._TextArea.setScrollTop(this._TextArea.getScrollHeight()); in every I update my textarea.

this is my code :

reqOpen.addEventListener("completed", function(e)
        {
            var isi = this._TextArea.getValue();
            isi = isi + "\n" +mySentence+"\n"+ e.getData().getContent();
             this._TextArea.setValue(isi);    
             this._TextArea.setScrollTop(this._TextArea.getScrollHeight());
        }, this);

it doesn't work. any other step ?

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

winmail.dat (4K) Download Attachment
Jonathan Weiß
Framework Engineer

Blog - LinkedIn - XING
Reply | Threaded
Open this post in threaded view
|

Re: Memo autoscroll and chat application

jhonny thio
In reply to this post by jhonny thio
Only this._TextArea.getElement().firstChild.scrollTop = 200; ?
it also doesn't work. You can see my code below :

reqOpen.addEventListener("completed", function(e)
        {
            var isi = this._TextArea.getValue();
            isi = isi + "\n" +mySentence+"\n"+ e.getData().getContent();
            this._TextArea.setValue(isi);   
            this._TextArea.getElement().firstChild.scrollTop = 200;
        }, this);

If have filled my textarea with a large mount of text, but it doesn't scroll to bottom.
Any other command ?



----- Original Message ----
From: Jonathan Rass <[hidden email]>
To: qooxdoo Development <[hidden email]>
Sent: Wednesday, July 16, 2008 8:40:58 AM
Subject: Re: [qooxdoo-devel] Memo autoscroll and chat application

Hi Jhonny!


The problem is that the "scrollTop" property is applied on the widget's div element. At the moment we have no getter or setter for the "scrollTop" or "scrollLeft" property of htmlarea elements.
As workaround you can set the value on the htmlarea directly (here for qooxdoo 0.7.x):

this._TextArea.getElement().firstChild.scrollTop = 200;


Cheers,
Jonathan

-----Original Message-----
From: [hidden email] on behalf of jhonny thio
Sent: Wed 7/16/2008 4:24 PM
To: qooxdoo Development
Subject: Re: [qooxdoo-devel] Memo autoscroll and chat application

I have tried : this._TextArea.setScrollTop(this._TextArea.getScrollHeight()); in every I update my textarea.

this is my code :

reqOpen.addEventListener("completed", function(e)
        {
            var isi = this._TextArea.getValue();
            isi = isi + "\n" +mySentence+"\n"+ e.getData().getContent();
            this._TextArea.setValue(isi);   
            this._TextArea.setScrollTop(this._TextArea.getScrollHeight());
        }, this);

it doesn't work. any other step ?


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Memo autoscroll and chat application

thron7
jhonny thio wrote:

> Only this._TextArea.getElement().firstChild.scrollTop = 200; ?
> it also doesn't work. You can see my code below :
>
> reqOpen.addEventListener("completed", function(e)
>         {
>             var isi = this._TextArea.getValue();
>             isi = isi + "\n" +mySentence+"\n"+ e.getData().getContent();
>             this._TextArea.setValue(isi);  
>             this._TextArea.getElement().firstChild.scrollTop = 200;
>         }, this);
>
> If have filled my textarea with a large mount of text, but it doesn't
> scroll to bottom.
> Any other command ?
Look, it probably doesn't help just to try arbitrary commands, does it?!
Have you experimented? Tried offsets other than 200, e.g. 10,000?! I'd
suggest to do try this way

this._TextArea.getElement().firstChild.scrollTop =
this._TextArea.getElement().firstChild.scrollHeight;

but I strongly recommend doing a bit of reading about these attributes
and methods. Try things out in Firebug!

Thomas


>
>
>
> ----- Original Message ----
> From: Jonathan Rass <[hidden email]>
> To: qooxdoo Development <[hidden email]>
> Sent: Wednesday, July 16, 2008 8:40:58 AM
> Subject: Re: [qooxdoo-devel] Memo autoscroll and chat application
>
> Hi Jhonny!
>
>
> The problem is that the "scrollTop" property is applied on the
> widget's div element. At the moment we have no getter or setter for
> the "scrollTop" or "scrollLeft" property of htmlarea elements.
> As workaround you can set the value on the htmlarea directly (here for
> qooxdoo 0.7.x):
>
> this._TextArea.getElement().firstChild.scrollTop = 200;
>
>
> Cheers,
> Jonathan
>
> -----Original Message-----
> From: [hidden email]
> <mailto:[hidden email]> on behalf of
> jhonny thio
> Sent: Wed 7/16/2008 4:24 PM
> To: qooxdoo Development
> Subject: Re: [qooxdoo-devel] Memo autoscroll and chat application
>
> I have tried :
> this._TextArea.setScrollTop(this._TextArea.getScrollHeight()); in
> every I update my textarea.
>
> this is my code :
>
> reqOpen.addEventListener("completed", function(e)
>         {
>             var isi = this._TextArea.getValue();
>             isi = isi + "\n" +mySentence+"\n"+ e.getData().getContent();
>             this._TextArea.setValue(isi);  
>             this._TextArea.setScrollTop(this._TextArea.getScrollHeight());
>         }, this);
>
> it doesn't work. any other step ?
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> ------------------------------------------------------------------------
>
> _______________________________________________
> qooxdoo-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>  


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Memo autoscroll and chat application

dblacha
In reply to this post by jhonny thio


jhonny thio wrote:

>
> I have tried :
> this._TextArea.setScrollTop(this._TextArea.getScrollHeight()); in every I
> update my textarea.
>
> this is my code :
>
> reqOpen.addEventListener("completed", function(e)
>         {
>             var isi = this._TextArea.getValue();
>             isi = isi + "\n" +mySentence+"\n"+ e.getData().getContent();
>              this._TextArea.setValue(isi);    
>            
> this._TextArea.setScrollTop(this._TextArea.getScrollHeight());
>         }, this);
>
> it doesn't work. any other step ?
>
>

hi

my solution, without using a qx.ui.form.TextArea.[set|get]Scroll[...], is:

var t = new qx.ui.embed.HtmlEmbed("<textarea id='db_001'></textarea>");
somewidget.add(t);
var v = document.getElementById('db_001');
and in a callback just I do:
v.scrollTop = v.scrollHeight;

it's working perfectly with <textarea> ale also with <div> and should with
any other scrollable elements.

best regards
dominik

--
View this message in context: http://www.nabble.com/Memo-autoscroll-and-chat-application-tp18467866p18489057.html
Sent from the qooxdoo-devel mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Memo autoscroll and chat application

dblacha
In reply to this post by jhonny thio


jhonny thio wrote:

>
> I have tried <textarea>.setOverflow("auto"), but this command doesn't
> work.
>
> Maybe I must tell again about my problem...
> Every I pressed enter in my textfield, the textfield.value will move to
> textarea.
> If the textarea.value has bigger than the textarea size, will be shown a
> scroll bar.
> My problem is although there is a scroll bar, but the focus of the
> textarea still in a first line..
> so if I want read the newest line, I must scroll manual the focus to the
> the most bottom line.
>
> so how I can make my textarea always focus to the new line?
>
>

Hi, I have the same problem. How to scroll to bottom.
This trick (working in pure js+html):
<textarea>.setScrollTop(<textarea>.getScrollHeight());
should works, but it does not.

Have you got any answer?

BR
Dominik
--
View this message in context: http://www.nabble.com/Memo-autoscroll-and-chat-application-tp18467866p18483601.html
Sent from the qooxdoo-devel mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Memo autoscroll and chat application

thron7
dblacha wrote:

> jhonny thio wrote:
>  
>> I have tried <textarea>.setOverflow("auto"), but this command doesn't
>> work.
>>
>> Maybe I must tell again about my problem...
>> Every I pressed enter in my textfield, the textfield.value will move to
>> textarea.
>> If the textarea.value has bigger than the textarea size, will be shown a
>> scroll bar.
>> My problem is although there is a scroll bar, but the focus of the
>> textarea still in a first line..
>> so if I want read the newest line, I must scroll manual the focus to the
>> the most bottom line.
>>
>> so how I can make my textarea always focus to the new line?
>>
>>
>>    
>
> Hi, I have the same problem. How to scroll to bottom.
> This trick (working in pure js+html):
> <textarea>.setScrollTop(<textarea>.getScrollHeight());
> should works, but it does not.
>
> Have you got any answer?
>  

I think this has been answered by Jonathan.

T.

> BR
> Dominik
>  


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Memo autoscroll and chat application

thron7
In reply to this post by dblacha
dblacha wrote:

> jhonny thio wrote:
>  
>> I have tried :
>> this._TextArea.setScrollTop(this._TextArea.getScrollHeight()); in every I
>> update my textarea.
>>
>> this is my code :
>>
>> reqOpen.addEventListener("completed", function(e)
>>         {
>>             var isi = this._TextArea.getValue();
>>             isi = isi + "\n" +mySentence+"\n"+ e.getData().getContent();
>>              this._TextArea.setValue(isi);    
>>            
>> this._TextArea.setScrollTop(this._TextArea.getScrollHeight());
>>         }, this);
>>
>> it doesn't work. any other step ?
>>
>>
>>    
>
> hi
>
> my solution, without using a qx.ui.form.TextArea.[set|get]Scroll[...], is:
>
> var t = new qx.ui.embed.HtmlEmbed("<textarea id='db_001'></textarea>");
> somewidget.add(t);
> var v = document.getElementById('db_001');
> and in a callback just I do:
> v.scrollTop = v.scrollHeight;
>
> it's working perfectly with <textarea> ale also with <div> and should with
> any other scrollable elements.
>  

Right, but this is the exact same thing as using

this._TextArea.getElement().firstChild.scrollTop =
this._TextArea.getElement().firstChild.scrollHeight;

You're working on the DOM element directly (either through document.getElementById() or _TextArea.getElement()) and setting scrollTop to scrollHeight. I would prefer the latter form since it saves you from the effort of going through an HtmlEmbed.

T.




> best regards
> dominik
>
>  


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Memo autoscroll and chat application

dblacha



thron7 wrote:

>
> [...]
>> my solution, without using a qx.ui.form.TextArea.[set|get]Scroll[...],
>> is:
>>
>> var t = new qx.ui.embed.HtmlEmbed("<textarea id='db_001'></textarea>");
>> somewidget.add(t);
>> var v = document.getElementById('db_001');
>> and in a callback just I do:
>> v.scrollTop = v.scrollHeight;
>>
>> it's working perfectly with <textarea> ale also with <div> and should
>> with
>> any other scrollable elements.
>>  
>
> Right, but this is the exact same thing as using
>
> this._TextArea.getElement().firstChild.scrollTop =
> this._TextArea.getElement().firstChild.scrollHeight;
>
> You're working on the DOM element directly (either through
> document.getElementById() or _TextArea.getElement()) and setting scrollTop
> to scrollHeight. I would prefer the latter form since it saves you from
> the effort of going through an HtmlEmbed.
>
> T.
>
>

right!
thank you for instruction: I was trying in that way, but without
".firstChild" property.
but... is it that property in API document?
the qx.dom.Element is deprecated in 0.7.3 API and has not any property
called ".firstChild"...

b.r.
dominik

--
View this message in context: http://www.nabble.com/Memo-autoscroll-and-chat-application-tp18467866p18505261.html
Sent from the qooxdoo-devel mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Memo autoscroll and chat application

thron7

>
> right!
> thank you for instruction: I was trying in that way, but without
> ".firstChild" property.
> but... is it that property in API document?
> the qx.dom.Element is deprecated in 0.7.3 API and has not any property
> called ".firstChild"...
>  

Widget.getElement()
(http://demo.qooxdoo.org/current/apiviewer/#qx.ui.core.Widget~getElement)
does *not* return a qx.dom.Element, but a *DOM node*. From there, you're
in the realm of DOM APIs (see e.g.
http://developer.mozilla.org/en/docs/DOM:element.firstChild).

T.



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Memo autoscroll and chat application

Derrell Lipman
In reply to this post by dblacha
On Thu, Jul 17, 2008 at 6:05 AM, dblacha <[hidden email]> wrote:

thank you for instruction: I was trying in that way, but without
".firstChild" property.
but... is it that property in API document?
the qx.dom.Element is deprecated in 0.7.3 API and has not any property
called ".firstChild"...

The getElement() method returns a DOM element.  The API documentation describes only the qooxdoo methods, not the DOM.

I'd highly recommending obtaining a copy of the O'Reily book "Javascript, The Definitive Guide".  Read it cover-to-cover, and then keep it close by for ready reference.  I consider it a must-have reference for serious Javascript developers.

Cheers,

Derrell


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Memo autoscroll and chat application

dblacha
In reply to this post by thron7



thron7 wrote:

>
>
>>
>> right!
>> thank you for instruction: I was trying in that way, but without
>> ".firstChild" property.
>> but... is it that property in API document?
>> the qx.dom.Element is deprecated in 0.7.3 API and has not any property
>> called ".firstChild"...
>>  
>
> Widget.getElement()
> (http://demo.qooxdoo.org/current/apiviewer/#qx.ui.core.Widget~getElement)
> does *not* return a qx.dom.Element, but a *DOM node*. From there, you're
> in the realm of DOM APIs (see e.g.
> http://developer.mozilla.org/en/docs/DOM:element.firstChild).
>
> T.
>
>

OK., that's now clear for me. I now understand, that all a not-linked-to,
function return type or a property in API, is just a DOM or a JS object. I
must be reading an API more carefully :)
thank you.

db
--
View this message in context: http://www.nabble.com/Memo-autoscroll-and-chat-application-tp18467866p18507990.html
Sent from the qooxdoo-devel mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Memo autoscroll and chat application

thron7
dblacha wrote:

>
> thron7 wrote:
>  
>>    
>>> right!
>>> thank you for instruction: I was trying in that way, but without
>>> ".firstChild" property.
>>> but... is it that property in API document?
>>> the qx.dom.Element is deprecated in 0.7.3 API and has not any property
>>> called ".firstChild"...
>>>  
>>>      
>> Widget.getElement()
>> (http://demo.qooxdoo.org/current/apiviewer/#qx.ui.core.Widget~getElement)
>> does *not* return a qx.dom.Element, but a *DOM node*. From there, you're
>> in the realm of DOM APIs (see e.g.
>> http://developer.mozilla.org/en/docs/DOM:element.firstChild).
>>
>> T.
>>
>>
>>    
>
> OK., that's now clear for me. I now understand, that all a not-linked-to,
> function return type or a property in API, is just a DOM or a JS object. I
>  

Exactly. (I had to read that thrice, but now I got it :). Yes, to put it
the other way round: In Apiviewer, type information like the return type
of a method will be linked to the respective qooxdoo class, if it indeed
*is* a qooxdoo class. Otherwise, the type is just a string representing
a native JS type. - Yes, maybe not immediately obvious, more one of the
subtleties of the Apiviewer (Are you all aware of the built-in search
facility?!).

T.

> must be reading an API more carefully :)
> thank you.
>
> db
>  


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel