[mcclim-devel] Command translator question

Duncan Rose duncan at robotcat.demon.co.uk
Sat Apr 30 16:58:52 UTC 2005


On Saturday, April 30, 2005, at 03:48 PM, Paul Werkowski wrote:

> | | Any suggestions would be appreciated, I'm obviously missing 
> something...
> |
> | Well, you have not defined COM-DESCRIBE in the attached glimpse.lisp.
> | I have never tried using the global command table in translators so I
> can't
> | say
> | for sure that it should work. I have always used the frame command 
> table
> for
> | translators.
>
> Seems like COM-DESCRIBE is in McCLIM but not Lispworks CLIM.

Now you mention it the spec, from what I can remember, is very quiet 
about
what commands are available in any given CLIM implementation. This 
probably
means that for truly portable code, it's not possible to rely on any
commands existing and all should therefore be defined in the application
itself.

That seems like it could be quite a chore...

> I defined that, and worked around the CLIMI internal stuff using CLIM
> MAP-OVER-x
> functions. Having done that and a bit more hacking (below) your code 
> worked,
> meaning that command "Show Sheet Hierarchy" displayed a tree of sheet
> objects
> that were mouse sensitive for COM-DESCRIBE.
>

This is good news, I think. Or maybe not. Hrmmm.

> Some other things:
>
> (find-pane-named *application-frame* 'app) returned a SPACING-PANE.
> I had to use GET-FRAME-PANE instead.

 From the spec:
"
get-frame-pane  frame pane-name  [Generic function]
Returns the named CLIM stream pane in the frame frame whose name is 
pane-name .

find-pane-named  frame pane-name  [Generic function]
Returns the pane in the frame frame whose name is pane-name . This can 
return any type of pane, not just CLIM stream panes.
"

I had assumed (presumably incorrectly for Lispworks CLIM, at least) 
that a pane defined as being :interactor or :application would be, 
well, an interactor or an application pane (which are stream panes). I 
hadn't realized this might not be portable, but have changed the code 
accordingly.

>
> Sometimes SHEET-CHILDREN popped a NO-APPLICABLE-METHOD
> for objects for which SHEETP returned T. The only way I could find to
> proceed
> was to define dummy methods for classes
>   WIN32-LIB-CLIM::WIN32- TOP-LEVEL-MENU
>   WIN32-LIB-CLIM::WIN32-SCROLLBAR-PANE
>   WIN32-LIB-CLIM:: WIN32-POINTER-DOCUMENTATION-PANE
>
> Obviously these won't be a problem in McCLIM but it does indicate 
> probing
> too low into the implementation might be problematic.
>

Ouch... I could check for the method existing on the object, but I 
suspect this is a specification violation on the part of Lispworks... 
the spec is very clear that "All sheet objects must implement or 
inherit methods for each of these generic functions" (section 7.2.1) 
immediately above the description of SHEET-CHILDREN.

This is all very interesting to me, thank you for taking the time to 
investigate it.

-Duncan


> Paul
>
>




More information about the mcclim-devel mailing list