Hello Ariel.

the underlying issue is in LoginPanel.fillCredentials():
>
> this.getUserNameTextField().
> setText(creditionals.getUserName());
> creditionals.getUserName() returns null. You should check if this is a bug
> or the expected behaviour (no OOo API bug in either case).
>

I'm agree with you, it is more a fillCredentials() problem, it would be
better to construct the credentionals.userName as an empty string instead
of a null one. But because it was (at least), an enhancement, i was only
"replicating" the effect.

I've Uploaded in my GitHub account, the .oxt (the extension itself), so
everybody who wants, could test it. As far as i've tested, it seems that in
linux and windows the extension works great.


On Mon, Nov 7, 2011 at 3:41 PM, Ariel Constenla-Haile <
ariel.constenla.ha...@gmail.com> wrote:

> 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():
>
> this.getUserNameTextField().setText(creditionals.getUserName());
>
> 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.
>
>
> Regards
> --
> Ariel Constenla-Haile
> La Plata, Argentina
>

Reply via email to