CLIM mail archive

[Prev][Next][Index][Thread]

Clim Listener demo extension



   Date: Fri, 18 Mar 1994 16:36:46 -0500
   From: Adam Carlson <carlson%lindy@cs.umass.edu>

   Clim 1.1
     Lucid 4.1 - Sparc
     Lispworks 3.1 - Sparc & Alpha
   Clim 2.0 beta
     Lucid 4.1 - Sparc
     Lispworks 3.2b1 - Alpha

   I have an application which has a command reader based on the listener code
   which is part of the clim demo files.  I have encountered a number of problems
   on different plaforms/lisp implementations.

   Below I include source code which duplicates these bugs.

   1) Command name completion doesn't work. (Clim 1 & Clim 2)

   If there are two commands, (com-foo :name "Foo") and (com-foo-bar :name "Foo
   Bar"), then in order to use the first command, you must type return after
   typing :foo, but _before_ hitting space.  This is especially annoying in
   harlequin where tab isn't a completion character, so you have to type space to
   do command name completion and then hit backspace so that the longer command
   name isn't assumed.  This causes problems if the command takes arguments,
   because it has trouble parsing arguments when the space ending the command is
   missing.  I suspect this is a problem with the accept method for
   command-or-form (as opposed to the accept method for command, which works).

   This is demonstrated in the section labeled "Command completion bug" below

The "ambiguous left-hand substring" problem has plagued command line
completion since its inception in Genera, circa 1986.  Nobody has ever
come up with a satisfactory solution, despite repeated efforts.  I'm
afraid you will have to simply think of different command line names,
unless you have a proposal that solves the problem.

   2) Presentation-translation on presentation-types which inherit from
   expression.  (Clim 1 & Clim 2)

   I have objects which have name slot and a value slot.  Normally I want them to
   insert their value slot anytime they are clicked on in an expression context.
   In addition, there are special types of expressions in which I want them to
   insert their name.  I created a special-expression presentation type which
   inherited from expression.  Then I wrote presentation-translators for
   thing-to-value and thing-to-name which specialize on the context being
   expression or special-expression (respectively).  The thing-to-value
   presentation translator always gets run, even in a special-expression context.
   Furthermore, if the values are lists, and I try to click on them while typing
   a form (i.e. a list), the listener produces an end-of-file in incomplete list
   error.  (So if I type "(find 'foo <*>" where <*> means I clicked on a thing
   with a list as a value, it bombs out.)  I have tried numerous variations using
   tester functions, priority settings and nothing works.  When I had a tester
   function which printed the context, it would always be expression, even when I
   was accepting a special-expression.  I hope this doesn't fall under Scott
   McKay's recent posting saying "I'll buy the drinks for the person who can get
   EXPRESSION right."

   This is demonstrated in the section labeled "expression inheritance bug" below

I'll try to get time to look at this.

   3) How do I get pointer-documentation to work in clim 2?

   I've tried using :pointer-documentation t in the define-application-frame.  I
   saw that in other peoples code.  I've also tried using a pane of type
   :pointer-documentation.  The problem there is that I can't get it to be just
   one line high, it's relative to the size of the window.  Even then I can get a
   pointer documentation pane to show up, but nothing ever appears in it.

   This is demonstrated in the define-application-frame and the various
   presentation translators which have pointer-documentation below.

I'll try to get time to look at this, too.

   4) Can't select menu items for commands with no arguments. (Clim 2)

   This is the case in my application, but I couldn't reproduce this in the
   simple test case.  I did find that under lucid clim-2, commands displayed
   directly in the menu bar can't be clicked on, instead, you have to hold down
   the left mouse button and drag the mouse over the command.

   This isn't demonstrated in the section labeled "No argument bug" below

Ditto.

   4) The prompt icon displays incorrectly (harlequin clim-2 beta)

   When the interactor pane is not the leftmost pane in the frame.  The prompt
   icon seems have its horizontal lines rotated, (i.e. the bottom couple of lines
   are at the top of the icon.) this rotation changes sometimes, but I haven't
   been able to pinpoint when except after the debugger code executes.  (I
   suspect that in that case it is because a different prompt is used while in
   the debugger level.)  Also, dynamically changing layouts doesn't work.

This is just a bug in the general pattern drawer in Harlqn CLIM.  It
specifies a gcontext that tiles when it should not.

   This is demonstrated by the section labeled "Switching layouts bug" below


   5) Presentation to command translators (Lucid clim-2 beta)

   Presentation to command translators work differently in lucid than in other
   lisps, in particular, it seems necessary to quote the arguments being returned
   by the translator in lucid but not in other implementations.

   This is demonstrated by the section labeled "Presentation to command
   translator" below


   Thanks for any advice on any of these points.  I'm sure that some of the
   "bugs" are caused by my inadequate knowledge of clim and the fact that I based
   this on the listener code from the demo, but it calls some internal stuff
   which I don't fully understand, and possibly use incorrectly.

   Code follows

[Not any more]


Main Index | Thread Index