incubator-ooo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gerardo Gómez <gerardo.g...@gmail.com>
Subject Re: Problem when showing a dialog of a deployed extension
Date Mon, 07 Nov 2011 20:25:40 GMT
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);
}

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. Thank you
for your help Ariel.


2011/11/7 Gerardo Gómez <gerardo.gr90@gmail.com>

> In this case the text is null (the string passed as argument to the
> setText method). The xTextComponent it is constructed correctly.
> I've uploaded all the NetBeans project to my GitHub account, you can check
> all the code and test the whole project just by downloading everything
> contained there: https://github.com/GerardoGR/UNOGDocs
>
>
> On Mon, Nov 7, 2011 at 12:12 AM, Ariel Constenla-Haile <
> ariel.constenla.haile@gmail.com> wrote:
>
>> On Sun, Nov 06, 2011 at 11:29:37PM -0600, Gerardo Gómez wrote:
>> > Yes, i had already set a breakpoint, and i don't think the problem is on
>> > the UploadDialog.java, because i can execute it separately from the
>> > extension. It only happens, when i deploy it (from netbeans), to my
>> > OpenOffice.org.
>>
>> did you try debugging the extension? Context menu "Debug Extension in
>> Target OpenOffice.org", or the hard way by attaching the debugger.
>>
>> > This is the code i use to show/hide a dialog
>> >
>> >     public void setVisible(boolean visible){
>> > //        If this dialog is modal...
>> >         if (modal){
>> >             if (visible){
>> > //                ...it uses execute to show the dialog.
>> >                 this.xDialog.execute();
>> >             }
>> >             else{
>> > //                ...it uses endExecute to hide the dialog.
>> >                 this.xDialog.endExecute();
>> >             }
>> >         }
>> > //        If this dialog is not modal...
>> >         else{
>> > //            ...it uses the setVisible method from the xWindow object.
>> >             this.xWindow.setVisible(visible);
>> >         }
>> >     }
>> >
>> > It seems also, that either in the extension execution and the execution
>> > from the main method, has the same parameters (a null string).
>> >
>> > public void fillCredentials(Creditionals creditionals) {
>> >
>> >
>> this.getRememberPassCheckBox().setState(creditionals.getWsCreditionalsReadedFromDisk());
>> > //      credentionals.getUserName() == null
>> >         this.getUserNameTextField().setText(creditionals.getUserName());
>> >         this.getPasswordTextField().setText(creditionals.getPassword());
>> >     }
>> >
>> > public void setText(String text){
>> >         this.xTextComponent.setText(text);
>> >     }
>>
>> what is null in this case? text or xTextComponent?
>>
>> If your extension is open source, may be you could point to the NB project
>> source and we can test what's hapening.
>>
>> Regards
>> --
>> Ariel Constenla-Haile
>> La Plata, Argentina
>>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message