CLIM mail archive

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

Menu-bar menu command args




Hi.  I tried posting this once before, but I don't know if it got through,
so...

I'm running ACL 4.2 final on a Sparc 10.  If I define a command, which takes
an object as an argument, and make this command available on the menu-bar,
when I select it I will be prompted for the object argument.  This is fine.

If, however, I make the command available from a sub-menu on the menu-bar,
and I select the command, all I will get is a *beep* - no prompt or 
anything else.

Any ideas?

(Below is a longer-winded description of this behavior...)

----------------------------------------

I have an application frame defined called myframe, and I have a simple
command defined, as follows: 

(define-myframe-command (com-show-object :menu "Show")
 ((object 'myobject :gesture :select))
(show-object object))

If I use this in a frame which contains an :interactor pane, and I select
this command from the menu bar, I am prompted for an object in the
interactor pane, and can select objects from the screen once I click on the
prompt. 

If the pane has no interactor pane, then objects on the screen are
immediately selectable (no clicking on the prompt required; in fact, no
prompt to click on). All this is ok so far. 

I can also define the command as follows, and will get the same behavior: 

(define-command (com-show-object :menu "Show" :command-table myframe)
 ((object 'myobject :gesture :select))
(show-object object))

And alternatively the same for the following: 

(define-command-table mycommands)
(define-command (com-show-object :menu "Show" :command-table mycommands)
((object 'myobject :gesture :select))
(show-object object))

and then in the define-application-frame 

(:command-table myframe :inherit-from (mycommands) :inherit-menu t) 


But if I change this last bit to:

(:command-table myframe :inherit-from (mycommands) 
:menu (("Mymenu" :menu mycommands)))

and I then select the command from the menu, I get no prompt (even with an
interactor pane present), and CLIM simply *beeps* at me (but I see no other
error). 

?




Main Index | Thread Index