incubator-ooo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ariel Constenla-Haile <>
Subject Re: Problem when showing a dialog of a deployed extension
Date Mon, 07 Nov 2011 21:41:58 GMT
Hello Gerardo,

On Mon, Nov 07, 2011 at 02:25:40PM -0600, Gerardo Gómez wrote:
> I have addressed my problem with the null ref, it was due to assigning to
> xText.setText, a null string, i only added an if:
> public void setText(String text){
>     if (text != null)
>         this.xTextComponent.setText(text);
> }

another option:

public void setText( String text ) {
    this.xTextComponent.setText( text == null ? "" : text );

an empty string will clear the text field (a null string will crash
OOo). May be clearing the text field is the desired effect when you get
a null string reference.

> I'm not really happy with this solution, but it seams to work good, so
> until i don't find any other solution i will keep it this way. 

the underlying issue is in LoginPanel.fillCredentials():


creditionals.getUserName() returns null. You should check if this is a bug
or the expected behaviour (no OOo API bug in either case).

> Thank you for your help Ariel.

You're welcome.

Nice to see you took the work to convert the Java dialogs to UNO awt. We
all know it's a lot of extra code, but a nicer integration with OOo UI.

Ariel Constenla-Haile
La Plata, Argentina

View raw message