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 d...@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-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org