Return-Path: X-Original-To: apmail-incubator-ooo-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-ooo-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3BA2498F2 for ; Tue, 8 Nov 2011 12:40:50 +0000 (UTC) Received: (qmail 49254 invoked by uid 500); 8 Nov 2011 12:40:50 -0000 Delivered-To: apmail-incubator-ooo-dev-archive@incubator.apache.org Received: (qmail 49210 invoked by uid 500); 8 Nov 2011 12:40:50 -0000 Mailing-List: contact ooo-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ooo-dev@incubator.apache.org Delivered-To: mailing list ooo-dev@incubator.apache.org Received: (qmail 49202 invoked by uid 99); 8 Nov 2011 12:40:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Nov 2011 12:40:50 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [92.249.128.185] (HELO relay03.digicable.hu) (92.249.128.185) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Nov 2011 12:40:42 +0000 Received: from [94.21.15.75] (helo=[192.168.0.101]) by relay03.digicable.hu with esmtpa id 1RNkyQ-0002Oq-T0 for ; Tue, 08 Nov 2011 13:40:21 +0100 Message-ID: <4EB92330.6040502@hdsnet.hu> Date: Tue, 08 Nov 2011 13:40:16 +0100 From: =?ISO-8859-1?Q?Reizinger_Zolt=E1n?= User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: ooo-dev@incubator.apache.org Subject: Re: Problem when showing a dialog of a deployed extension References: <20111107050939.GA540@localhost> <20111107061231.GB540@localhost> <20111107214158.GA7399@localhost> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Original: 94.21.15.75 X-Virus-Checked: Checked by ClamAV on apache.org 2011.11.07. 23:42 keltez�ssel, Gerardo G�mez �rta: > 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. I added your extension 0.0.1 version, downloaded today, tested under win7, to OOo 3.3 and OOo 3.4Beta(oracle), and AOOo 3.4. Java versions selected: 1.6.0_27 (and same with java 1.6.0_18): I get same error from all versions, I copied here as I get from debug version of AOOo 3.4 messages. When clicked on "configure" button: --------------------------- Debug Output --------------------------- Error: UnoWrapper::SetWindowInterface: there already *is* a WindowInterface for this window! From File y:/apache/trunk/main/toolkit/source/helper/unowrapper.cxx at Line 186 Abort ? (Yes=abort / No=ignore / Cancel=core dump) --------------------------- Igen Nem M�gse --------------------------- Second: --------------------------- Debug Output --------------------------- Error: VCLXToolkit::createWindow: did #133706# resurge? From File y:/apache/trunk/main/toolkit/source/awt/vclxtoolkit.cxx at Line 1138 Abort ? (Yes=abort / No=ignore / Cancel=core dump) --------------------------- Igen Nem M�gse --------------------------- Third: --------------------------- Debug Output --------------------------- Error: [jni_uno bridge error] Java calling UNO method setText: [map_to_uno():string] null-ref given! java stack trace: at com.sun.star.bridges.jni_uno.JNI_proxy.dispatch_call(Native Method) at com.sun.star.bridges.jni_uno.JNI_proxy.invoke(JNI_proxy.java:175) at $Proxy33.setText(Unknown Source) at util.OoTextField.setText(OoTextField.java:50) at org.openoffice.gdocs.ui.dialogs.ConfigDialog.(ConfigDialog.java:157) at org.openoffice.gdocs.UNOGDocs$1.run(UNOGDocs.java:104) at java.lang.Thread.run(Thread.java:619) From File Y:/apache/trunk/main/bridges/source/jni_uno/jni_java2uno.cxx at Line 633 Abort ? (Yes=abort / No=ignore / Cancel=core dump) --------------------------- Igen Nem M�gse --------------------------- When I clicked on "Export to Google docs": --------------------------- Debug Output --------------------------- Error: [jni_uno bridge error] Java calling UNO method setText: [map_to_uno():string] null-ref given! java stack trace: at com.sun.star.bridges.jni_uno.JNI_proxy.dispatch_call(Native Method) at com.sun.star.bridges.jni_uno.JNI_proxy.invoke(JNI_proxy.java:175) at $Proxy33.setText(Unknown Source) at util.OoTextField.setText(OoTextField.java:50) at org.openoffice.gdocs.ui.LoginPanel.fillCredentials(LoginPanel.java:179) at org.openoffice.gdocs.ui.LoginPanel.readCreditionals(LoginPanel.java:202) at org.openoffice.gdocs.ui.LoginPanel.setSystem(LoginPanel.java:212) at org.openoffice.gdocs.ui.dialogs.UploadDialog.(UploadDialog.java:181) at org.openoffice.gdocs.UNOGDocs$2.run(UNOGDocs.java:231) at java.lang.Thread.run(Thread.java:619) From File Y:/apache/trunk/main/bridges/source/jni_uno/jni_java2uno.cxx at Line 633 Abort ? (Yes=abort / No=ignore / Cancel=core dump) --------------------------- Igen Nem M�gse --------------------------- I hope this help you. Zoltan > > > On Mon, Nov 7, 2011 at 3:41 PM, Ariel Constenla-Haile< > ariel.constenla.haile@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 >>