From: Ken Cheetham

Subject: Re: [pcspr4288] Custom event handling of a widget

Date: 1997-1-4 1:47


  1. I have tried something similar to above without the line expression
  (subclass-widget a-my-item-list-instance) and it works. I'm just
  wondering if the (subclass-widget instance) expression really does
  anything.

I just remembered that if you are using the pre-win95 interface
(windows 3.1, windows for workgroups, or NT before 4.0) then we
automatically call subclass-widget on at least some of the OS widgets
in order to draw 3d borders over top of the black borders that the OS
draws.  Win95 and NT 4.0 have (nicer) 3d borders already and so we
don't do need to use this hack there.

  2. It seems that this method is too low-level in my case. What I'd
  like to do is to let the user use a mouse to select an item and I'd
  process the item with my function. The behavior is almost exactly the
  same as set-value-fn but I'd like the function to be invoked even if
  the user clicks on the same item repeatedly.  However, the above
  suggested method intercept the call before the new item is selected so
  my function works on the old item. I have tried to make the method as
  an after method but it does the same thing. Is there anyway to get
  around? Say, programatically send a system message to force the system
  handler to process the event, or progrmatically produce an event.

I expect that if you call call-next-method at the top of your EVENT
method rather than at the end then the OS will establish the new value
at that time and then you can refer to it after the call to
call-next-method.

Ken Cheetham                          <franz.com at cheetham>
Franz Inc.                            Voice: (510) 548-3600
1995 University Avenue, Suite 275     Fax:   (510) 548-8253
Berkeley, CA  94704                   http:  //www.franz.com/
ACL Windows FAQ: ftp.franz.com:/pub/acl4w-faq
ACL Unix    FAQ: ftp.franz.com:/pub/faq