[Uim] Questions on coding for uim
TOKUNAGA Hiroyuki
tkng at xem.jp
Sat Jun 18 21:14:29 EEST 2005
Hi,
On 18 Jun 2005 15:28:07 +0900
Park Jae-hyeon <jhpark at kias.re.kr> wrote:
> Hello,
>
> I have bug reports on UIM. I am using 0.4.6final1-3 on Debian sarge.
>
> 1) UIM scheme interpreter does not have independent boolean values,
> and predicates do not return boolean values. For example, with
> uim-sh, I get
>
> uim> #t
> 1
> uim> #f
> ()
> uim> (equal? #t 1)
> t
> uim> (boolean? 1)
> t
> uim> (boolean? '())
> t
> uim> (not '())
> t
>
> while, with guile, I get
>
> guile> #t
> #t
> guile> #f
> #f
> guile> (equal? #t 1)
> #f
> guile> (boolean? '())
> #f
> guile> (boolean? 1)
> #f
> guile> (not '())
> #f
>
> As far as I know, scheme should distinguish #t from 1, and #f from
> '(). '() should count as true, not false. Also, a predicate such
> as equal? should return either #t or #f, and nothing else. I found
> that this was already reported in the bugzilla as bugs #617 and
> #642.
Yes, guile's implementation is right. The scheme interpreter of uim has
some problems. Now Kazuki seems writing a new scheme interpreter for
uim, so please wait a while.
> 2) Switching input method does not always work. I run gedit with
>
> $ GTK_IM_MODULE=uim gedit
>
> with no other program using uim, and do
>
> $ uim-im-switcher-gtk
>
> After I choose another input method in uim-im-switcher-gtk's window
> and click Okay, sometimes the input method is switched to the new
> one, and sometimes it is not.
Maybe it is caused by the bug of uim-helper-server. Please test again
with 0.4.7. 0.4.7 will be released on June 26.
> 3) The optional third argument of delete in util.scm, defaults to =.
> http://srfi.schemers.org/srfi-1/srfi-1.html#delete says that the
> default comparison procedure should be equal?.
I think you are right. I'll improve.
> 4) If I click on a submit button before committing preedit in a
> mozilla form, the preedit reappears the next time I begin input.
> For example, at www.google.com, I write in the form,
>
> はやくちことば
>
> using anthy, but I do not commit the string by hitting RETURN yet.
> I click on the Google Search button. Then, I see the search
> results. Now, when I type a key in the form, はやくちことば
> appears in the preedit area plus the newly typed key. Maybe this
> is a bug of mozilla, not of uim, in view of the fact that I have
> the same phenomenon with kinput2 + canna. Probably, this is
> related with the issue of reset, focus-in, focus-out, and
> focus-move.
Yes, this problem is related on the issue of reset. I'll investigate
later, but maybe it's difficult to fix from uim side.
> I have a question on writing scheme code for uim, related to bug 1).
> The second argument of context-update-preedit is a list of pairs of
> attributes and strings. According to anthy-input-state-preedit, it
> seems that the list is also allowed to have #f or '() as one of its
> elements. Is it #f or '() that can be an element of the second
> argument of context-update-preedit?
attr should be a number which defined in im.scm. i.e. preedit-none,
preedit-underline, preedit-reverse, preedit-cursor or preedit-
separator. If there's no attribute, you should use preedit-none. On the
other hand, when the segment has no str, you should use "".
Regards,
--
TOKUNAGA Hiroyuki
tkng at xem.jp
More information about the uim
mailing list