|
View:
New views
12 Messages
—
Rating Filter:
Alert me
|
|
|
empty string in PropertyValue in dispatch methodHi,
first I was directed to dev@openoffice group but I think that this one is more proper for my problem. I'm developing Java addon for OO3.1. (OOO310m11 Build: 9399) I'm having toggledropdown control and when user select something from that control I get to: - public void dispatch(URL aURL, PropertyValue[] aArguments) then I iterate on the aArguments to find the property with "Text" name. PropertyValue propertyValue = aArguments[i]; if (propertyValue.Name.equals("Text")) and here I get the text that user selected on the toggledropdown. This one works fine, but I have problem with Dropdownbox. I used same code with dropdownbox and when user select something from dropdown I always get empty string in "Text". There's also one other property KeyModifier which Value is always 0. Is it a bug or I'm doing something wrong? I appreciate any help. Best regards -- Krzysztof Rączkiewicz krzysztof.raczkiewicz@... +48 509 507 512 www.tembo.pl --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
|
|
Re: empty string in PropertyValue in dispatch methodKrzysztof Rączkiewicz wrote:
> Hi, > first I was directed to dev@openoffice group but I think that this one > is more proper for my problem. > > I'm developing Java addon for OO3.1. (OOO310m11 Build: 9399) > I'm having toggledropdown control and when user select something from > that control I get to: > - public void dispatch(URL aURL, PropertyValue[] aArguments) > then I iterate on the aArguments to find the property with "Text" name. > PropertyValue propertyValue = aArguments[i]; > if (propertyValue.Name.equals("Text")) > > and here I get the text that user selected on the toggledropdown. > This one works fine, but I have problem with Dropdownbox. > > I used same code with dropdownbox and when user select something from > dropdown I always get empty string in "Text". There's also one other > property KeyModifier which Value is always 0. > > Is it a bug or I'm doing something wrong? > I appreciate any help. Could you please tell me more about your use case? I don't know if you use the complex toolbar controls feature or a dropdownbox within a UNO AWT dialog. I would guess the first case but you can definitely tell me. Do you have a link where I can download the add-on to reproduce your problem? Regards, Carsten --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
|
|
Re: empty string in PropertyValue in dispatch methodCarsten Driesner pisze:
> Could you please tell me more about your use case? I don't know if you > use the complex toolbar controls feature or a dropdownbox within a UNO > AWT dialog. I would guess the first case but you can definitely tell me. > Do you have a link where I can download the add-on to reproduce your > problem? Carsten, first of all, thanks for so quick response. My addon use some external libraries (accessed by JNI), so I prepared an example for you: http://tembo.pl/pub/Wroter-example.zip in Wroter class in dispatch method, line 185. It's a Netbeans project. Thanks in advance -- Krzysztof Rączkiewicz krzysztof.raczkiewicz@... +48 509 507 512 www.tembo.pl --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
|
|
Re: empty string in PropertyValue in dispatch methodHello Carsten,
On Thursday 03 September 2009, 10:35, Carsten Driesner wrote: > Krzysztof Rączkiewicz wrote: > > Hi, > > first I was directed to dev@openoffice group but I think that this one > > is more proper for my problem. > > > > I'm developing Java addon for OO3.1. (OOO310m11 Build: 9399) > > I'm having toggledropdown control and when user select something from > > that control I get to: > > - public void dispatch(URL aURL, PropertyValue[] aArguments) > > then I iterate on the aArguments to find the property with "Text" name. > > PropertyValue propertyValue = aArguments[i]; > > if (propertyValue.Name.equals("Text")) > > > > and here I get the text that user selected on the toggledropdown. > > This one works fine, but I have problem with Dropdownbox. > > > > I used same code with dropdownbox and when user select something from > > dropdown I always get empty string in "Text". There's also one other > > property KeyModifier which Value is always 0. > > > > Is it a bug or I'm doing something wrong? > > I appreciate any help. > > Hi Krzysztof, > > Could you please tell me more about your use case? I don't know if you > use the complex toolbar controls feature or a dropdownbox within a UNO > AWT dialog. I would guess the first case but you can definitely tell me. > Do you have a link where I can download the add-on to reproduce your > problem? the example must be compiled with make DEBUG=yes). Whenever a "color" from the listbox is selected, it prints Thread: 1 :BaseDispatch::dispatch - Command7 Thread: 1 :[0] KeyModifier = 0 Thread: 1 :[1] Text = Debugging this Regards -- Ariel Constenla-Haile La Plata, Argentina [complextoolbarcontrols_MyProtocolHandler.cxx.diff] Sólo en .: complextoolbarcontrols_MyProtocolHandler.cxx.diff diff -EbwBu /opt/openoffice.org/basis3.2/sdk/examples/cpp/complextoolbarcontrols/Makefile ./Makefile --- /opt/openoffice.org/basis3.2/sdk/examples/cpp/complextoolbarcontrols/Makefile 2009-08-06 00:28:12.000000000 -0300 +++ ./Makefile 2009-09-03 11:32:12.000000000 -0300 @@ -79,6 +79,7 @@ Example include $(SETTINGS)/stdtarget.mk +CC_FLAGS += -DOSL_DEBUG_LEVEL=2 $(OUT_COMP_SLO)/%.$(OBJ_EXT) : %.cxx $(SDKTYPEFLAG) -$(MKDIR) $(subst /,$(PS),$(@D)) diff -EbwBu /opt/openoffice.org/basis3.2/sdk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx ./MyProtocolHandler.cxx --- /opt/openoffice.org/basis3.2/sdk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx 2009-08-06 00:28:12.000000000 -0300 +++ ./MyProtocolHandler.cxx 2009-09-03 11:39:07.000000000 -0300 @@ -370,6 +370,32 @@ else if ( !aURL.Path.compareToAscii("Command5" ) ) { } + else if ( !aURL.Path.compareToAscii("Command7" ) ) + { + OSL_TRACE( "BaseDispatch::dispatch - Command7" ); + for ( sal_Int32 i = 0; i < lArgs.getLength(); i++ ) + { + PropertyValue propVal = lArgs[i]; + if ( propVal.Name.equalsAsciiL( "Text", 4 )) + { + rtl::OUString sValue; + propVal.Value >>= sValue; + OSL_TRACE("[%d] %s = %s", + i, + ::rtl::OUStringToOString( propVal.Name, RTL_TEXTENCODING_ASCII_US ).getStr(), + ::rtl::OUStringToOString( sValue, RTL_TEXTENCODING_ASCII_US ).getStr() ); + } + else if ( propVal.Name.equalsAsciiL( "KeyModifier", 11 )) + { + sal_Int32 iValue; + propVal.Value >>= iValue; + OSL_TRACE("[%d] %s = %d", + i, + ::rtl::OUStringToOString( propVal.Name, RTL_TEXTENCODING_ASCII_US ).getStr(), + iValue); + } + } + } } } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
|
|
Re: empty string in PropertyValue in dispatch methodOn Thursday 03 September 2009, 12:23, Ariel Constenla-Haile wrote:
> Hello Carsten, > > On Thursday 03 September 2009, 10:35, Carsten Driesner wrote: > > Krzysztof Rączkiewicz wrote: > > > Hi, > > > first I was directed to dev@openoffice group but I think that this one > > > is more proper for my problem. > > > > > > I'm developing Java addon for OO3.1. (OOO310m11 Build: 9399) > > > I'm having toggledropdown control and when user select something from > > > that control I get to: > > > - public void dispatch(URL aURL, PropertyValue[] aArguments) > > > then I iterate on the aArguments to find the property with "Text" name. > > > PropertyValue propertyValue = aArguments[i]; > > > if (propertyValue.Name.equals("Text")) > > > > > > and here I get the text that user selected on the toggledropdown. > > > This one works fine, but I have problem with Dropdownbox. > > > > > > I used same code with dropdownbox and when user select something from > > > dropdown I always get empty string in "Text". There's also one other > > > property KeyModifier which Value is always 0. > > > > > > Is it a bug or I'm doing something wrong? > > > I appreciate any help. > > > > Hi Krzysztof, > > > > Could you please tell me more about your use case? I don't know if you > > use the complex toolbar controls feature or a dropdownbox within a UNO > > AWT dialog. I would guess the first case but you can definitely tell me. > > Do you have a link where I can download the add-on to reproduce your > > problem? > > you can reproduce it with your C++ SDK example (see the diff I attached > here, the example must be compiled with make DEBUG=yes). > > Whenever a "color" from the listbox is selected, it prints > > Thread: 1 :BaseDispatch::dispatch - Command7 > Thread: 1 :[0] KeyModifier = 0 > Thread: 1 :[1] Text = > > > Debugging this ... gives me Breakpoint 2, framework::DropdownToolbarController::execute (this=0x7f9a086f6a08, KeyModifier=0) at /mnt/build/openoffice/DEV300_m52/framework/source/uielement/dropdownboxtoolbarcontroller.cxx:204 204 Reference< XDispatch > xDispatch; (gdb) n 205 Reference< XURLTransformer > xURLTransformer; (gdb) n 206 ::rtl::OUString aCommandURL; (gdb) n 207 ::rtl::OUString aSelectedText; (gdb) n 208 ::com::sun::star::util::URL aTargetURL; (gdb) n 211 vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); (gdb) n 213 if ( m_bDisposed ) (gdb) n 216 if ( m_bInitialized && (gdb) n 221 xURLTransformer = m_xURLTransformer; (gdb) n 222 xDispatch = getDispatchFromCommand( m_aCommandURL ); (gdb) n 223 aCommandURL = m_aCommandURL; (gdb) n 224 aTargetURL = getInitializedURL(); (gdb) n 225 aSelectedText = m_pListBoxControl->GetText(); aSelectedText is zero length... Regards -- Ariel Constenla-Haile La Plata, Argentina --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
|
|
Re: empty string in PropertyValue in dispatch methodOn Thursday 03 September 2009, 12:28, Ariel Constenla-Haile wrote:
> On Thursday 03 September 2009, 12:23, Ariel Constenla-Haile wrote: > > Hello Carsten, > > > > On Thursday 03 September 2009, 10:35, Carsten Driesner wrote: > > > Krzysztof Rączkiewicz wrote: > > > > Hi, > > > > first I was directed to dev@openoffice group but I think that this > > > > one is more proper for my problem. > > > > > > > > I'm developing Java addon for OO3.1. (OOO310m11 Build: 9399) > > > > I'm having toggledropdown control and when user select something from > > > > that control I get to: > > > > - public void dispatch(URL aURL, PropertyValue[] aArguments) > > > > then I iterate on the aArguments to find the property with "Text" > > > > name. PropertyValue propertyValue = aArguments[i]; > > > > if (propertyValue.Name.equals("Text")) > > > > > > > > and here I get the text that user selected on the toggledropdown. > > > > This one works fine, but I have problem with Dropdownbox. > > > > > > > > I used same code with dropdownbox and when user select something from > > > > dropdown I always get empty string in "Text". There's also one other > > > > property KeyModifier which Value is always 0. > > > > > > > > Is it a bug or I'm doing something wrong? > > > > I appreciate any help. > > > > > > Hi Krzysztof, > > > > > > Could you please tell me more about your use case? I don't know if you > > > use the complex toolbar controls feature or a dropdownbox within a UNO > > > AWT dialog. I would guess the first case but you can definitely tell > > > me. Do you have a link where I can download the add-on to reproduce > > > your problem? > > > > you can reproduce it with your C++ SDK example (see the diff I attached > > here, the example must be compiled with make DEBUG=yes). > > > > Whenever a "color" from the listbox is selected, it prints > > > > Thread: 1 :BaseDispatch::dispatch - Command7 > > Thread: 1 :[0] KeyModifier = 0 > > Thread: 1 :[1] Text = > > > > > > Debugging this > > ... gives me > > Breakpoint 2, framework::DropdownToolbarController::execute > (this=0x7f9a086f6a08, KeyModifier=0) > at > /mnt/build/openoffice/DEV300_m52/framework/source/uielement/dropdownboxtool > barcontroller.cxx:204 204 Reference< XDispatch > xDispatch; > (gdb) n > 205 Reference< XURLTransformer > xURLTransformer; > (gdb) n > 206 ::rtl::OUString aCommandURL; > (gdb) n > 207 ::rtl::OUString aSelectedText; > (gdb) n > 208 ::com::sun::star::util::URL aTargetURL; > (gdb) n > 211 vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() > ); (gdb) n > 213 if ( m_bDisposed ) > (gdb) n > 216 if ( m_bInitialized && > (gdb) n > 221 xURLTransformer = m_xURLTransformer; > (gdb) n > 222 xDispatch = getDispatchFromCommand( m_aCommandURL ); > (gdb) n > 223 aCommandURL = m_aCommandURL; > (gdb) n > 224 aTargetURL = getInitializedURL(); > (gdb) n > 225 aSelectedText = m_pListBoxControl->GetText(); > > aSelectedText is zero length... seems this should be aSelectedText = m_pListBoxControl->GetSelectEntry(); instead of aSelectedText = m_pListBoxControl->GetText(); Regards -- Ariel Constenla-Haile La Plata, Argentina --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
|
|
Re: empty string in PropertyValue in dispatch methodOn Thursday 03 September 2009, 13:23, Ariel Constenla-Haile wrote:
> > > you can reproduce it with your C++ SDK example (see the diff I attached > > > here, the example must be compiled with make DEBUG=yes). > > > > > > Whenever a "color" from the listbox is selected, it prints > > > > > > Thread: 1 :BaseDispatch::dispatch - Command7 > > > Thread: 1 :[0] KeyModifier = 0 > > > Thread: 1 :[1] Text = > > > > > > > > > Debugging this > > > > ... gives me > > > > Breakpoint 2, framework::DropdownToolbarController::execute > > (this=0x7f9a086f6a08, KeyModifier=0) > > at > > /mnt/build/openoffice/DEV300_m52/framework/source/uielement/dropdownboxto > >ol barcontroller.cxx:204 204 Reference< XDispatch > > > xDispatch; (gdb) n > > 205 Reference< XURLTransformer > xURLTransformer; > > (gdb) n > > 206 ::rtl::OUString aCommandURL; > > (gdb) n > > 207 ::rtl::OUString aSelectedText; > > (gdb) n > > 208 ::com::sun::star::util::URL aTargetURL; > > (gdb) n > > 211 vos::OGuard aSolarMutexGuard( > > Application::GetSolarMutex() ); (gdb) n > > 213 if ( m_bDisposed ) > > (gdb) n > > 216 if ( m_bInitialized && > > (gdb) n > > 221 xURLTransformer = m_xURLTransformer; > > (gdb) n > > 222 xDispatch = getDispatchFromCommand( m_aCommandURL ); > > (gdb) n > > 223 aCommandURL = m_aCommandURL; > > (gdb) n > > 224 aTargetURL = getInitializedURL(); > > (gdb) n > > 225 aSelectedText = m_pListBoxControl->GetText(); > > > > aSelectedText is zero length... > > seems this should be > > aSelectedText = m_pListBoxControl->GetSelectEntry(); > > instead of > > aSelectedText = m_pListBoxControl->GetText(); yes, now with m_pListBoxControl->GetSelectEntry() works fine [cf. how css.awt.XListBox.getSelectedItem() ends up in http://svn.services.openoffice.org/opengrok/xref/DEV300_m56/toolkit/source/awt/vclxwindows.cxx#1713] Thread: 1 :BaseDispatch::dispatch - Command7 Thread: 1 :[0] KeyModifier = 0 Thread: 1 :[1] Text = Blue Thread: 1 :BaseDispatch::dispatch - Command7 Thread: 1 :[0] KeyModifier = 0 Thread: 1 :[1] Text = Blue Thread: 1 :BaseDispatch::dispatch - Command7 Thread: 1 :[0] KeyModifier = 16384 Thread: 1 :[1] Text = Yellow Thread: 1 :BaseDispatch::dispatch - Command7 Thread: 1 :[0] KeyModifier = 0 Thread: 1 :[1] Text = Black Thread: 1 :BaseDispatch::dispatch - Command7 Thread: 1 :[0] KeyModifier = 8192 Thread: 1 :[1] Text = Blue selected inputmethod style = PreeditNothing StatusNothing Thread: 1 :BaseDispatch::dispatch - Command7 Thread: 1 :[0] KeyModifier = 0 Thread: 1 :[1] Text = Yellow Regards -- Ariel Constenla-Haile La Plata, Argentina --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
|
|
Re: empty string in PropertyValue in dispatch methodAriel Constenla-Haile pisze:
>> seems this should be >> >> aSelectedText = m_pListBoxControl->GetSelectEntry(); >> >> instead of >> >> aSelectedText = m_pListBoxControl->GetText(); > > yes, now with m_pListBoxControl->GetSelectEntry() works fine ok, thanks for checking that. I suppose I will need to use toggledropdown for that control. Does this fix will be avaliable in next OO release (3.1.1)? Best regards -- Krzysztof Rączkiewicz krzysztof.raczkiewicz@... +48 509 507 512 www.tembo.pl --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
|
|
Re: empty string in PropertyValue in dispatch methodHello Krzysztof,
On Thursday 03 September 2009, 14:29, Krzysztof Rączkiewicz wrote: > >> seems this should be > >> > >> aSelectedText = m_pListBoxControl->GetSelectEntry(); > >> > >> instead of > >> > >> aSelectedText = m_pListBoxControl->GetText(); > > > > yes, now with m_pListBoxControl->GetSelectEntry() works fine > > ok, thanks for checking that. I suppose I will need to use > toggledropdown for that control. Does this fix will be avaliable in next > OO release (3.1.1)? no, 3.1.1 is closed ( http://wiki.services.openoffice.org/wiki/OOoRelease311 ) chances are you'll get this fixed for 3.2.0 ( http://wiki.services.openoffice.org/wiki/OOoRelease32 ), released by end of November. Regards -- Ariel Constenla-Haile La Plata, Argentina --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
|
|
Re: empty string in PropertyValue in dispatch methodAriel Constenla-Haile wrote:
> Hello Krzysztof, > > On Thursday 03 September 2009, 14:29, Krzysztof Rączkiewicz wrote: > >>>> seems this should be >>>> >>>> aSelectedText = m_pListBoxControl->GetSelectEntry(); >>>> >>>> instead of >>>> >>>> aSelectedText = m_pListBoxControl->GetText(); >>>> >>> yes, now with m_pListBoxControl->GetSelectEntry() works fine >>> >> ok, thanks for checking that. I suppose I will need to use >> toggledropdown for that control. Does this fix will be avaliable in next >> OO release (3.1.1)? >> > > no, 3.1.1 is closed ( http://wiki.services.openoffice.org/wiki/OOoRelease311 ) > chances are you'll get this fixed for 3.2.0 ( > http://wiki.services.openoffice.org/wiki/OOoRelease32 ), released by end of > November. > Thanks for your investigation. We have only a couple of days left before Code/Feature Freeze for OOo 3.2. Please write me an issue for this problem and I will try to fix it for OOo 3.2. Regards, Carsten --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
|
|
Re: empty string in PropertyValue in dispatch methodHello Carsten,
On Friday 04 September 2009, 03:57, Carsten Driesner wrote: > >> ok, thanks for checking that. I suppose I will need to use > >> toggledropdown for that control. Does this fix will be avaliable in next > >> OO release (3.1.1)? > > > > no, 3.1.1 is closed ( > > http://wiki.services.openoffice.org/wiki/OOoRelease311 ) chances are > > you'll get this fixed for 3.2.0 ( > > http://wiki.services.openoffice.org/wiki/OOoRelease32 ), released by end > > of November. > > Hi Ariel and Krzysztof, > > Thanks for your investigation. We have only a couple of days left before > Code/Feature Freeze for OOo 3.2. Please write me an issue for this > problem and I will try to fix it for OOo 3.2. http://www.openoffice.org/issues/show_bug.cgi?id=104788 Regards -- Ariel Constenla-Haile La Plata, Argentina --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
|
|
Re: empty string in PropertyValue in dispatch methodAriel Constenla-Haile wrote:
> Hello Carsten, > > On Friday 04 September 2009, 03:57, Carsten Driesner wrote: > >>>> ok, thanks for checking that. I suppose I will need to use >>>> toggledropdown for that control. Does this fix will be avaliable in next >>>> OO release (3.1.1)? >>>> >>> no, 3.1.1 is closed ( >>> http://wiki.services.openoffice.org/wiki/OOoRelease311 ) chances are >>> you'll get this fixed for 3.2.0 ( >>> http://wiki.services.openoffice.org/wiki/OOoRelease32 ), released by end >>> of November. >>> >> Hi Ariel and Krzysztof, >> >> Thanks for your investigation. We have only a couple of days left before >> Code/Feature Freeze for OOo 3.2. Please write me an issue for this >> problem and I will try to fix it for OOo 3.2. >> > > http://www.openoffice.org/issues/show_bug.cgi?id=104788 > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
| Free embeddable forum powered by Nabble | Forum Help |