[Uim] Re: question about function uim_reset_context()

TOKUNAGA Hiroyuki tkng at xem.jp
Tue Dec 21 11:30:56 EET 2004


Hi,

On Sat, 18 Dec 2004 02:56:54 +0100
Mike FABIAN <mfabian at suse.de> wrote:

> > In this mail, I want to write 2 things, the most ugly hack to commit
> > preedit strings and about semantic of reset.
> >
> > The most ugly hack is that:
> >
> >    if(there_is_preedit)
> >       rv = uim_press_key(context, UKey_Return, NULL);
> 
> Ha! Iwai San and me already tried this most ugly hack and found that
> this works as desired but we thought that this cannot be the correct
> way of doing it. After all the key binding to do the commit is
> configurable, it doesn't have to be "return" always, I think
> it is Control-J for some input methods.
> 
> So I kept searching for a real commit function.

Of course that's not correct way, ugly temporary solution.

> > instead of calling reset function. In most case, this will work. You
> > know, uim doesn't have explicit commit function.
> 
> But now you confirm that there isn't such a thing in uim, I was
> already starting to wonder why I couldn't find it.

> > If we want to add the explicit commit function to uim, we have to
> > extend all input methods of uim. Becausein uim, preedit strings !=
> > commited strings and there is no way to know commit strings until
> > commit_cb is called.
> 
> That is also what surprised me, I couldn't find a way to get the
> string to commit. I thought that I just didn't find it but now you say
> that there really is no way to know the commit string before the
> callback is called.

Yes, ther is no way to know the commit strings before the callback is
called. When I wrote previous mail, I had a will to implement reset
function (didn't have a will to make explicit commit function). But,
defining the semantic of reset is quite hard, I don't want to implement
this function for now. So, as a temporary (but better than 'the most
ugly hack'), now I'm thinking that I'll make new function 'uim_commit'
to commit preedit strings. Until this function works, you have to use
'the most ugly hack'.

If you have enough time to read Japanese and want to know more detailes
why I don't want to implement reset function, see:
http://lists.sourceforge.jp/mailman/archives/anthy-dev/2004-July/000938.html

And, I'll write my thought about the semantic of reset tonight..


Regards,

-- 
TOKUNAGA Hiroyuki
tkng at xem.jp
http://kodou.net/



More information about the uim mailing list