Detect when context menu opens or closes

Is there an easy way to detect when a (righ-click) context
menu is visible? I wish there was a "visible" property for the
Contextmenu class, but there isn't one.
I've tried to listen to events to know when the menu opens or
closes but it would seem as though there are far too many
(undocumented) events to take into account and some of the events
may be OS specific.
For example, the following 3 events cover much of the
scenarios of when the menu opens/closes...
cmMenu.addEventListener(ContextMenuEvent.MENU_SELECT,
onShow);
cmMenu.addEventListener(Event.DEACTIVATE, onHide);
stage.addEventListener(MouseEvent.MOUSE_DOWN, onHide);
But you can also click either the f10, alt, esc, or enter
keys to also close the menu. There could be other ways to close the
menu, but since it is not well documented, I can't be certain.
Too bad Event.CLOSE isn't dispatched when the menu closes.
If anyone knows of a resource that documents how to determine
when a context menu is opened or closed, please let me know.
thanks! :-)

Hello,
I'm also having problems with this topic.  I'm developing an AIR app that uses context menus, and I've noticed that if I bring up a context menu, mouse around it and highlight items, but DON'T select them (i.e. click off to close the menu) that the main application loses focus.  There seems to be an invisible window or something blocking mouse events, until I move the app or do a command-~ (I'm on a Mac...it's as if there are multiple open windows and this toggles them.)  Note that this only seems to happen in the exact sequence above - selecting an item or avoiding the items altogether after the menu pops up results in the correct (expected) behavior when the menu closes.
I'd like to be able to catch a close event of some kind for the context menu, and even better, find a way to prevent the problem described above.
Below is a very simple AIR app that will demonstrate the problem. (I'm compiling with Flex 3.4.1 framework and running it on Snow Leopard...)  Much thanks in advance to anyone who can help me with this problem!
-Chris
<mx:WindowedApplication layout="absolute" applicationComplete="init()"
xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
private function init():void {
// Listener to trace mouseX property
myCanvas.addEventListener(MouseEvent.MOUSE_MOVE,
function (e:MouseEvent):void {
trace(myCanvas.mouseX);
// Create a simple context menu
myCanvas.contextMenu= new ContextMenu();
myCanvas.contextMenu.addItem(new NativeMenuItem("test"));
]]>
</mx:Script>
<mx:Canvas id="myCanvas" height="50%" width="50%" backgroundColor="0x00FF00"/>
</mx:WindowedApplication>

Similar Messages

  • Right click context menu opens then closes quickly in Finder

    After my upgrade to Snow Leopard, I now have a problem with Finder. When I right click on something to get the context menu, sometimes, it works fine, and others, the contextual menu shows up for a second then closes. The only way I can select any of those options is to right click and hold, then select. This is getting annoying.
    It seems like maybe a corrupt preference? Anyone seen this before or have an idea how to solve it?

    I knew I wasn't alone! This has happened with my install of Snow Leopard as well. The only difference is that this started happening immediately after the install and I did a fresh formatted install, not an upgrade.
    I made a short video about it here:
    http://qik.com/video/2742618
    Any help on this would be appretiated. It seems like this isn't too widespread an issue, but who knows. People might not be piping up about it. It is incredibly annoying, however.

  • Playback drops frame rate when context menu opens

    Hello,
    I was wondering why is frame rate of the video drops when I open the context menu, the playback seems to go down as much as 5fps, and it goes back to normal when the context menu is closed.
    Thanks in advance.

    lghtanddrk, if you send me a link to your AVCHD MTS file, I can trying exporting it as a MOV file and see if I get the same issue. For me QT seems to be slowing no matter what HD file I give it.
    What camera did you use to shoot your footage and how big is the AVCHD file? What's the data rate of your MP4/H.264 file? Again, if it's possible to get some of your MP4 footage, I can check if I have problems playing it.
    I have two partions on my machine: one is WinXP SP2 without the updates and QT7.3.1 (for Avid XPress Pro) and the other has WinXP SP3 with all the updates and QT7.6.4 (I think that's the latest one). So, I can try on both to see if there are issues.
    When you export as DV AVI, are you exporting as a SD (720x480?). I know that HD is square pixels and SD is non-square. The HD is 16x9 and the SD is 4:3. You could try and export your AVI as 720x540 square pixels or 720x480 non-square i.e. NTSC (CCIR 601) or try exporting as 854x480 square pixels to give your original 16x9 widescreen at SD resolution. I haven't looked at this stuff for a while, so, I'm kind of guessing here!

  • System don't have menu Open and Close Posting Periods

    Hi,
    My system don't have menu "open and close posting periods" (full path in below). I search in google say that my system should active Public Sector Management to use this function.
    I need to make sure before active, please help me if you known about this. And what BCSet will I need to active, is it IS-PS-CA ?
    Thank you very much,
    Regards,
    Thanh.
    Full menu path:
    Accounting - Financial Accounting - General Ledger - Environment - Current Settings - Open and Close Posting Periods According to G/L Account Assignment Objects

    Hi,
    You can use this Txn. OB52....
    1. Goto SFW5..
    2. Choose "Enterprise Addons" tab..
    3. Against Business Function EA-PS...Change the Status to On and then activate..
    4. Log off and Login again...now check the menu path.
    Also check this. (for  SAP ECC 6.0 version)
    SPRO>Financial Accounting (New)>Financial Accounting Global Settings (New)>Ledgers>
    Fiscal Year and Posting Periods>Posting Periods>Open and Close Posting Periods
    Regards
    GK.
    Edited by: Gnana Kumar on Nov 19, 2010 9:49 AM

  • Firefox crashing when i wanna open or close a tab or a window, also while wanna open any page, now what to do for solving the problem?

    Firefox crashing when i wanna open or close a tab or a window, also while wanna open any page, now what to do for solving the problem?

    Disable McAfee siteadvisor and check the problem still persist or not?

  • Can I chnge the context menu "open in new tab / window" options back to the previous version (reverse order)?

    In Firefox 4, the context menu "open in new tab / open in new window" options are in reverse order compared to 3.6. Can this be "fixed," i.e. change the menu item order? I use this feature constantly and it's a matter of habit, also still use some 3.6 machines.

    You can use the Menu Editor extension to re-arrange the menus - https://addons.mozilla.org/firefox/addon/menu-editor

  • HT2476 I have just downloaded Mountain Lion for my MacBook Pro and now when my applications open they close and the error "This has just quit unexpectedly" message pops up. Does anybody know what is happening?

    I have just downloaded Mountain Lion for my MacBook Pro and now when my applications open they close and the error "This has just quit unexpectedly" message pops up. Does anybody know what is happening/how to fix it?

    Welcome to Apple Communities
    Press Command and R keys in boot and reinstall

  • When I right-click, the same context menu opens up (the menu for hyperlinks, with "Open Link in New Tab" and the like) regardless of what/where I right-click.

    Regardless of where I right-click on a displayed webpage (NOT the menu bar at the top of the screen), be it highlighted text, a blank spot in a webpage, or anything, the context menu for a hyperlink pops up (with the options for opening it in a new tab, window or private window, bookmarking), and none of the options actually do anything even if it is a hyperlink I'm clicking on. Using keyboard shortcuts like Ctrl + clicking work fine. I haven't installed any plugins recently, and it only started a few hours ago. Wat do?

    Try disabling Firebug and see how it is.

  • MW64,  cs6 bridge when I move or copy files the  context menu does not retain  recent folder destinations after I close the program

    W64,  cs6 bridge when I move or copy files the  context menu does not retain  recent folder destinations after I close the program. The context options that show are the ones from original install. The workspace I set up is also gone. I have every explorer box and cleaner checked to save recent. Had to disable nivedia desktop software because of weird display conflict. Have Dell pro support and they cannot fix. Any ideas to help me with this would be appreciated.

    Self-solved!  I work in column view in Finder so get there in a Finder window with folders and files appearing.
    There really is no problem, just select an ITEM in the COLUMN before right-clicking!
    The "old" context menu will appear. If you click in the white space in that column (or anywhere in a Finder window) and then place the cursor over a folder or file WITHOUT selecting it and right-click you will bring up the secondary context menu - Open, Copy, Duplicate, View Options and a greyed out Labels option. No "Move to Trash".

  • Firefox hangs when opening any context menu - save as, download window, options window, etc

    this is the third time i've had this problem with firefox...
    firefox hangs when trying to download images, files, etc. the right click context menu opens (with bookmark, save page, save image, etc options) but after selecting an option, save image or whatever, the actual save as dialogue box doesn't open and firefox locks up.
    many pages say to open the download pane and clear the history... i can't do that as trying to open the download pane locks it up, too. as does trying to open any other dialogues.
    the first time this happened the only solution i could find was a total wipe and re-install (simple uninstall/re-install didn't work... it had to be weeded out of the registry manually).
    the second time i just happened to be rebuilding my system, so i just did a fresh install on a fresh OS.
    this time i can't seem to resolve the problem with uninstall and re-install...
    help?

    found out what was doing it!
    after trying firefox safe mode and windows safe mode and any number of other things i'd kinda given up for a bit there, but i woke from a dream in the middle of the night thinking "based on the behaviour involved it *must* be something in the shell that's causing this." (sorry, i dream in geek.)
    so i grabbed a shell viewer editor - ShelleExView (http://www.nirsoft.net/utils/shexview.html) (had to use an icky, lesser browser to be able to download it) and gave it a run.
    i listed all the extensions by the date they were added as a clsid and tried to think back to when the problem began... about a month or so after a fresh system reinstall. and through a little trial and error disabling i found the culprit.
    it was an icon overlay handler put in by something called WagerLogic. after looking into the company name i'm going to have to assume this was related to one of the annoying "come lose real money at our virtual casino" pop-ups that infest the net nefariously panning for an easy mark like dickensian orphans.
    i disabled it et voila! firefox is back to full function again.

  • Reader 9.3 context menu dominance (wants to open all .exe files)

    I didn't see this issue in the forum, so:
    My XP Pro SP3 install has taken over my context menu -- it placed "Read" at the top of my context menu for several different file types, including .exe, and it now attempts to open said files, which of course results in a "not a supported file type" prompt.
    It even tries (and fails) to re-open itself when I click its desktop icon!
    I can still open affected files by right-clicking in Windows Explorer (or shortcuts) then via context menu Open, but I have lost the ability to open programs via start/programs menu, desktop and directly in Windows Explorer (dbl-click).
    There's no exe extension for me to re-associate in the Windows Explorer Tools>Folder>Options>File Types.  I've looked in HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers and there's no Adobe entry.
    I've uninstalled everything Adobe, wiped all relevant files (found via Search), cleaned the registry, reinstalled from scratch.  No joy.
    Can I correct this (i.e., get rid of "Read" in context menu) or must I do w/o the latest Reader?

    I'll take the utter lack of response to mean there is no fix for this.  So be it.  Since I can't even boot up the affected machine because of this issue, I'm ditching Adobe Reader and using Foxit instead!

  • Cannot change "Open with" (in context menu) from CS3 to CS6

    I have CS5 and CS6 installed, and now I've also installed CS3 (because of problems with ps actions that does not work properly), and in the context menu "Open with", "Open" and "Edit" now starts CS3 instead of CS6.
    How change all that to CS6?
    Note:
    when choosing "Open with", "Select standard program", and browse/selecting the CS6 exe-file, then STILL the CS3 is displayed in context menu and the CS3 starts.  It's like there is some assocciation from CS6 to CS3 that cannot be altered??
    Do I have to uninstall CS6 and install CS6 again, or what?
    OS: Windows 7.
    And yes, all my PS versions are legit.

    When you install a version of Photoshop the install will associate many image file types the the Photoshop versions your installing.  You may want to re-install CS6 on top of itself and the update it.  You will still have all your Photoshop preferences and CS6 add-ons install and CS6 will be the default application for image file types. Or you can manually change all the image file type associations. Adobe Bridge CS6  may also be able to change image fie types associations in its edit preferences UI. I not sure about the bridge fie each version of the bridge I have installed shows that the same level as tne bridge version of Photoshop is associated with image file file type.  After  I installed CS2 I manually change Image File association back to CC.  However I had to re-install CC a couple of times since then. I have CS2, Subscription CS6 version and CC installed on my workstation.
    If you have old CS3 actions that do not work in CS5 and CS6 you can edit them and modify them to work in CS5 and CS6.  If the action add adjustment layers and that is where your you having Problems..  Adobe introduced options in CS4 adjustment panel that can cause Photoshop to work incorrectly.  If you set the option to Adobe defaults setting you may fine that your actions that add Adjustment layer work correctly.  For some unknown reason Adobe refuses the address the bad options they added to the Adjustments panels fly-out menu.  The options change Photoshop Behavior some time which simply put is a bug waiting to bite.

  • Context Menu in BW Report Iview not opening after upgrade to Portal 7.3

    Hi All,
    We have a unusual problem that, the Context menu of the BW reports for options like filtering is not opening post Upgrade to Portal 7.3 for End users.
    However, with Super Admin role, the Context menu opens for the BW report Iview.
    I have tried giving the same permission that the Super Admin Role has on the BW Report Iview to the End users, still no success.
    Any idea? Anybody faced same kind of problem?
    Please revert for any more info.
    BR,
    Uday

    Hi Uday,
    This is really a shot in the dark since I have not done much with 7.3.  Have you checked for UME actions that are assigned to the administrator but not the end user?
    Best regards,
    Duncan

  • When to open and close database connection

    im trying to connect to a oracle database using servlets
    when should i open and close the connection
    it works fine when i do both in the doPost() method
    but when i tried to open connection in init() methd .. it doesnt seem to work
    what should i do...
    the connection is initialised in the init() method but is null in the doPost() method

    " im trying to connect to a oracle database using servlets
    when should i open and close the connection
    it works fine when i do both in the doPost() method
    but when i tried to open connection in init() methd .. it doesnt seem to work
    what should i do...
    the connection is initialised in the init() method but is null in the doPost() method"
    1:
    without seeing the code i would say the the connection is null
    because you are storing it as a servlet class variable which is
    not thread safe.
    2:
    The best way to do it using connection pooling
    detailed docs on the tomcat website
    3:
    if you are not using connection pooling, then
    open and close the connection in the do* method
    or
    use init() to place the connection in the servletconfig
    and close in destroy() and use synching to access

  • Disable Right Click Context Menu in XP "OPEN WITH ADOBE READER 8"

    How can I eliminate the right click context menu "OPEN WITH ADOBE READER 8" in Windows XP?
    I have general familiarity with removing context menus. I see no option for this one in msconfig, or various context menu editors. I am unable to find a setting in Adobe Reader 8. If you know where the setting is, or have solved this problem, please let me know.
    Thanks,
    Joey

    That would be the device Metadata from the print driver vendor. It's part of the Device Stage feature mainly for client OS.
    Here is some MSDN documentation on the feature.
    http://windows.microsoft.com/en-us/windows7/products/features/device-management
    If this is a print server, use the tools include by the print team if you are performing any management on the server.
    Printmanagement.msc
    The Devices UI is really about devices it's not designed for print management, the spooler team had minimal input on the UI design.
    Alan Morris formerly with Windows Printing Team

Maybe you are looking for

  • Can I change the default color of Word windows so that icons can stand out better?

    I'd prefer someting like white as a background color behind the functions, toolbars, etc. (I hope I'm explaining myself properly.) Also, the icons are really tiny. The only thing I see that a user is able to modify is the background (non-type) of the

  • Authentication error while consuming web service published in SR of CE 7.1

    Hi, I am having this error while trying to consume a web service published in local services registry. Authentication level is set as Basic in the web service and in end point. I am receiving this error in security log files. Message:Authentication f

  • Inserting Fireworks HTML

    I have inserted an HTML image from Fireworks into Dreamweaver. It has converted to an AP element within Dreamweaver. It is a drop down menu which is functional, the only problem is when I preview it in Internet Explorer the image shifts to the right.

  • How to fit an iplate to a faceplate

    Hi, My broadband speed is apprx 1.7 Meg and i heard that fitting an iplate can improve performance considerably in most cases. the problem is that my faceplate has 2 ports, one is for my phone and the other is from an old (now redundant) business lin

  • JOT and JDeveloper

    are there docs for the JOT (java object tool) API for JDeveloper? I can find the ones for JBuilder (quite different from what I can tell), and the AddIn tutorial, but no further docs... specifically, the problem at hand is to add a comment to a JotFi