Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 1690 by [email protected]: get_surrounding_text() can't be called with NULL arguments from python-gi
http://code.google.com/p/ibus/issues/detail?id=1690

What version of the product are you using? On what operating system?
OS (Linux distributions, UNIX or ...): ArchLinux
Architecture (i386, x86_64): x86_64
IBus version: 1.5
Python version: 3

I'm writing an input method using Python's GObject Introspection binding. My input method makes use of get_surrounding_text() but the docs [1] said that I should tell input contexts that I will use surrounding text by calling get_surrounding_text() with cursor_pos and anchor_pos, which are [out] parameters, set to NULL.

The problem is that python-gi hides [out] parameters from the user and will return them wrapped in a tuple when the call returns. Hence the issue in the summary.

IMHO, surrounding text should be available all the time. And even if I had to register to use it, I would prefer to call a dedicated method like set_use_surrounding_text() rather than recycle get_surrounding_text().

[1]: http://ibus.googlecode.com/svn/docs/ibus-1.5/IBusEngine.html#ibus-engine-get-surrounding-text

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
--
You received this message because you are subscribed to the Google
Groups "ibus-devel" group.
iBus project web page: http://code.google.com/p/ibus/
iBus dev group: http://groups.google.com/group/ibus-devel?hl=en
--- You received this message because you are subscribed to the Google Groups "ibus-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

回复