You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by Jérôme Serré <je...@gmail.com> on 2012/04/06 21:39:03 UTC

Menu and shortcut

Hello,

 

I want to use shortcut on menubar but it doesn’t work.

I have to forget something but I don’t see what !

The action works but when I use “CTRL-A” no

 

Thanks for your help

 

…./…..

<actionMappings>

        <Window.ActionMapping action="1minute" keyStroke="CTRL-A"/>

</actionMappings>

<MenuBar.Item bxml:id="views" buttonData="Views">

<Menu>

                <sections>

                        <Menu.Section>

                                <Menu.Item bxml:id="1minute"
action="1minute" toggleButton="true">

                                       <buttonData>

                                               <content:MenuItemData text="1
Minute" keyboardShortcut="CTRL-A"/>

                                       </buttonData>

                               </Menu.Item>

</Menu.Section>

                </sections>

        </Menu>

</MenuBar.Item>

…/…

 

 

 

Jérôme Serré

________________________

Manage your cellar

Ma cave <http://www.macave.eu/> 

 


RE: Menu and shortcut

Posted by Jérôme Serré <je...@gmail.com>.
Ok thanks

Jérôme Serré
________________________
Manage your cellar
Ma cave

-----Message d'origine-----
De : Sandro Martini [mailto:sandro.martini@gmail.com] 
Envoyé : lundi 16 avril 2012 17:53
À : user@pivot.apache.org
Objet : Re: Menu and shortcut

Solving this issue should fix even this:
https://issues.apache.org/jira/browse/PIVOT-720

Sandro


Re: Menu and shortcut

Posted by Sandro Martini <sa...@gmail.com>.
Solving this issue should fix even this:
https://issues.apache.org/jira/browse/PIVOT-720

Sandro

Re: Menu and shortcut

Posted by Sandro Martini <sa...@gmail.com>.
Hi Jerome,
found this old thread with some info inside that confirm this behaviour:
http://apache-pivot-users.399431.n3.nabble.com/Problem-with-Keystrokes-not-getting-registered-td1706986.html

I reopened even another focus-related issue (but reassigned to 2.1,
because currently there is a workaround):
https://issues.apache.org/jira/browse/PIVOT-686

ASAP I'll put some other info in the page (but don't know when I'll
have some time to publish an updated version in the live site too)
here:
http://pivot.apache.org/tutorials/menu-bars.html


I'm thinking for 2.1 if (and how) could make sense to handle this
situation, even without an active focusable element, or make MenuBars
focusable from this point of view ...


If you have suggestions or comments, tell us ...

Bye,
Sandro

Re: Menu and shortcut

Posted by Sandro Martini <sa...@gmail.com>.
Hi Jerome,

> It's the same behavior with this appli :
> http://pivot.apache.org/tutorials/menu-bars.html
> The first time it doesn't work (may be the focus) after click "New" it works.
>
> Windows 7 & IE 9.0
Yes, you have reason, it's a focus issue ... as a workaround you could
try to force the focus in some (input-enabled) text field, or maybe
with javascript if deployed as an applet ?

We could see if a forceFocus (or similar) setting somewhere could help
(in BrowserApplicationContext and/or in bxml for the toplevel Window)
...

Comments (even from others) ?

Thanks for now,
Sandro

RE: Menu and shortcut

Posted by Jérôme Serré <je...@gmail.com>.
Hello Sandro,

It's the same behavior with this appli :
http://pivot.apache.org/tutorials/menu-bars.html
The first time it doesn't work (may be the focus) after click "New" it
works.

Windows 7 & IE 9.0


Jérôme Serré
________________________
Manage your cellar
Ma cave

-----Message d'origine-----
De : Sandro Martini [mailto:sandro.martini@gmail.com] 
Envoyé : mardi 10 avril 2012 13:07
À : user@pivot.apache.org
Objet : Re: Menu and shortcut

Hi Jerome,
have you tried with a different shortcut (to be sure that chosing a
"standard" one doesn't interfere with your selection ?
I'll look at code these days to see if there is something to fix.

In the meantime, could you try to add some code to MenuBarTest, and/or
ActionMappingTest ?
Maybe could help to identify the problem (is there is one).


Let's update.

Bye


Re: Menu and shortcut

Posted by Sandro Martini <sa...@gmail.com>.
Hi Jerome,
have you tried with a different shortcut (to be sure that chosing a
"standard" one doesn't interfere with your selection ?
I'll look at code these days to see if there is something to fix.

In the meantime, could you try to add some code to MenuBarTest, and/or
ActionMappingTest ?
Maybe could help to identify the problem (is there is one).


Let's update.

Bye

RE: Menu and shortcut

Posted by Jérôme Serré <je...@gmail.com>.
It's really weird,
When I first click on a button at the bottom, it works.
Otherwise not.

 

 

Jérôme Serré

________________________

Manage your cellar

 <http://www.macave.eu/> Ma cave

 

De : Jérôme Serré [mailto:jerome.michel.serre@gmail.com] 
Envoyé : vendredi 6 avril 2012 21:39
À : Apache-Pivot
Objet : Menu and shortcut

 

Hello,

 

I want to use shortcut on menubar but it doesn’t work.

I have to forget something but I don’t see what !

The action works but when I use “CTRL-A” no

 

Thanks for your help

 

…./…..

<actionMappings>

        <Window.ActionMapping action="1minute" keyStroke="CTRL-A"/>

</actionMappings>

<MenuBar.Item bxml:id="views" buttonData="Views">

<Menu>

                <sections>

                        <Menu.Section>

                                <Menu.Item bxml:id="1minute"
action="1minute" toggleButton="true">

                                       <buttonData>

                                               <content:MenuItemData text="1
Minute" keyboardShortcut="CTRL-A"/>

                                       </buttonData>

                               </Menu.Item>

</Menu.Section>

                </sections>

        </Menu>

</MenuBar.Item>

…/…

 

 

 

Jérôme Serré

________________________

Manage your cellar

Ma cave <http://www.macave.eu/>