You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pivot.apache.org by John Pritchard <jd...@syntelos.com> on 2009/03/19 19:12:10 UTC
r756120
Hi,
The change to TextArea would be a bug, as far as i know.
public TextArea() {
installSkin(TextArea.class);
<<<<<<< .mine
Document document = new Document();
document.add(new Paragraph());
this.setDocument(document);
=======
setText("");
>>>>>>> .r756120
}
I tried this and ran into problems with Document TextNode not being able to
calculate Bounds for an empty node. However, installing an empty Paragraph
worked flawlessly.
/john/
Re: r756120
Posted by Greg Brown <gk...@mac.com>.
That works, although the reset of the selection members should probably go in setDocument().
G
On Thursday, March 19, 2009, at 03:33PM, "John Pritchard" <jd...@syntelos.com> wrote:
>[revised patch]
>reset selection pointer and range for null or empty text
>
>
>(cheers)
>
Re: r756120
Posted by John Pritchard <jd...@syntelos.com>.
[revised patch]
reset selection pointer and range for null or empty text
(cheers)
Re: r756120
Posted by Greg Brown <gk...@mac.com>.
I should read all my messages before responding. Calling setText("") is the right approach - though it sounds like that method needs to be fixed.
In any case, I'd recommend not using TextArea until we are closer to the actual 1.1 release. It is not considered stable at the moment.
On Thursday, March 19, 2009, at 03:08PM, "John Pritchard" <jd...@syntelos.com> wrote:
>revision.. (patch attached)
>
>we need
>
>setText("")
>
>or equivalently
>
>setText(null)
>
>to work
>
>
>
>On Thu, Mar 19, 2009 at 2:12 PM, John Pritchard <jd...@syntelos.com> wrote:
>
>>
>> Hi,
>>
>> The change to TextArea would be a bug, as far as i know.
>>
>> public TextArea() {
>> installSkin(TextArea.class);
>> <<<<<<< .mine
>>
>> Document document = new Document();
>> document.add(new Paragraph());
>> this.setDocument(document);
>> =======
>> setText("");
>> >>>>>>> .r756120
>> }
>>
>> I tried this and ran into problems with Document TextNode not being able to
>> calculate Bounds for an empty node. However, installing an empty Paragraph
>> worked flawlessly.
>>
>> /john/
>>
>>
>
Re: r756120
Posted by John Pritchard <jd...@syntelos.com>.
revision.. (patch attached)
we need
setText("")
or equivalently
setText(null)
to work
On Thu, Mar 19, 2009 at 2:12 PM, John Pritchard <jd...@syntelos.com> wrote:
>
> Hi,
>
> The change to TextArea would be a bug, as far as i know.
>
> public TextArea() {
> installSkin(TextArea.class);
> <<<<<<< .mine
>
> Document document = new Document();
> document.add(new Paragraph());
> this.setDocument(document);
> =======
> setText("");
> >>>>>>> .r756120
> }
>
> I tried this and ran into problems with Document TextNode not being able to
> calculate Bounds for an empty node. However, installing an empty Paragraph
> worked flawlessly.
>
> /john/
>
>
Re: r756120
Posted by Greg Brown <gk...@mac.com>.
There are lots of bugs in TextArea at the moment. :-) But setting a default document is probably a good idea. Calling setText("") is a slightly simpler way to achieve this.
On Thursday, March 19, 2009, at 02:12PM, "John Pritchard" <jd...@syntelos.com> wrote:
>Hi,
>
>The change to TextArea would be a bug, as far as i know.
>
> public TextArea() {
> installSkin(TextArea.class);
><<<<<<< .mine
>
> Document document = new Document();
> document.add(new Paragraph());
> this.setDocument(document);
>=======
> setText("");
>>>>>>>> .r756120
> }
>
>I tried this and ran into problems with Document TextNode not being able to
>calculate Bounds for an empty node. However, installing an empty Paragraph
>worked flawlessly.
>
>/john/
>