[Libreoffice-bugs] [Bug 117849] XGridSelectionListener is not working in python

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sun Jul 1 12:12:15 UTC 2018


https://bugs.documentfoundation.org/show_bug.cgi?id=117849

--- Comment #3 from Drew Jensen <drewjensen.inbox at gmail.com> ---
(In reply to Ηλίας Ηλιάδης from comment #2)
> The ok works perfect. If you click in say the second row and then click OK
> the "Companies" form will receive the registration number from the first
> column of the selected row and will print 1: plus the registration number to
> the text box on the right of "Test Dialog Grid" button.
> 
> But the listener (a def inside the python class SomeListener) was supposed
> to show this "selected number" inside the dialog box instead of "HAS DATA"
> that shows initially.

It doesn't work when you set it the way the script does do in the dialog model.
I'm not sure that is right way to set that for a dialog though. 

So I changed the script and moved the place where the listener is added to
after the dialog is instantiated with this:

dlg.createPeer(theWindow, None)
thelistener = SomeListener()
dlg.getControl("CompaniesGrid").addSelectionListener(thelistener)
response = dlg.execute()

But still the function SomeListener is never being called. Honestly I'm not
sure if that is the right way to set that either, I'm trying to find the answer
to that question.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20180701/0742d1d2/attachment.html>


More information about the Libreoffice-bugs mailing list