views:

577

answers:

1

Hi,

I am using context menu using the code given below in a flex air application. For me all Context Menu Clipboard Items are working fine except "clear".

Plese suggest me where I am wrong.

var cMenu:ContextMenu = createContextMenu();

private function createContextMenu():ContextMenu
{            
        var editContextMenu:ContextMenu = new ContextMenu();
        editContextMenu.hideBuiltInItems();            
        editContextMenu.clipboardMenu = true;
        editContextMenu.clipboardItems.cut = true;
        editContextMenu.clipboardItems.copy = true;
        editContextMenu.clipboardItems.paste = true;

         //NOT WORKING
         editContextMenu.clipboardItems.clear = true;

        return editContextMenu
    }

Thanks in advance.

A: 

Is it possible that the object you are trying to clear cannot be cleared. Quote from the livedocs

Enables or disables the 'Delete' or 'Clear' item on the clipboard menu. This should be enabled only if an object that can be cleared is selected.

kenneth