[Uim] Remove some arguments from register-im

YamaKen yamaken at bp.iij4u.or.jp
Tue Jun 7 22:18:07 EEST 2005


At Wed, 8 Jun 2005 00:56:48 +0900,
tkng at xem.jp wrote:
> On Tue, 07 Jun 2005 02:12:53 +0900
> YamaKen <yamaken at bp.iij4u.or.jp> wrote:
> > At Mon, 6 Jun 2005 05:35:27 +0900,
> > tkng at xem.jp wrote:
> > > * add-handler
> > > 
> > >  added-handler takes three arguments, im-name, handler-type and
> > > handler- procedure. Maybe register-handler is more appropliate, but
> > > I appreciate add-handler.
> > 
> > It should be named as add-im-handler.
> 
> add-im-handler doesn't seem appropliate, because the handler does not
> handle input method, it handles passed arguments, such as key event.

It should not be named as add-handler because:

  - the plain word 'handler' is too generic to identify its role


It should be named as add-im-handler because:

  - key-press-handler is a handler held in im object

  - 'a handler held in im object' can be called as 'im-handler'

  - the 'add-handler' does replacing an im-handler with new one

  - so 'add-im-handler' is a natural name


It should not be named as im-add-handler because:

  - procedure names im-xxxx are reserved for im object methods
    such as im-set-encoding!

  - the 'add-handler' does not take im object as primary argument


(define-record 'im
  (list
   (list 'name                        #f)
   (list 'lang                        "")
   (list 'encoding                    "")
   (list 'name-label                  "")
   (list 'short-desc                  "")
   (list 'init-arg                    #f)
   (list 'init-handler                list)
   (list 'release-handler             list)
   (list 'mode-handler                list)
   (list 'key-press-handler           list)
   (list 'key-release-handler         list)
   (list 'reset-handler               list)
   (list 'get-candidate-handler       list)
   (list 'set-candidate-index-handler list)
   (list 'prop-activate-handler       list)
   (list 'module-name                 "")))

> > > * add-property
> > > 
> > >  This procedure takes takes three arguments, im-name, propery-name
> > > and propery- symbol.
> > > 
> > > Maybe add-propery is enough, add-handler is excess.
> > 
> > What are the properties you supporse? Show me actual example.
> 
> im-label description, etc, which characterize each input methods.

Show me your intention about 'etc'.

The im object already contains lang, encoding, name-label and
short-desc. I can't imagine that another property will be needed
soon.

If there are no certain new property supposed at now, the
add-property is an excessive generalization and unneeded.

-------------------------------
YamaKen  yamaken at bp.iij4u.or.jp



More information about the uim mailing list