1 Reply Latest reply on Apr 2, 2008 6:59 AM by Gregory Lafrance

    <ui:ContextMenuItem> in MXML causes Error 1136: Incorrect number of arguments

    Joubert Nel

      I'm trying to define a context menu declaratively like so:


      <ui:ContextMenu id="editChartDataContextMenu">
      <ui:ContextMenuItem caption="Clear"/>

      However, the Flex compiler gives an error for the line that reads "<ui:ContextMenuItem ....". (the line in boldface).
      The error is: 1136: Incorrect number of arguments. Expected 1.

      Needless to say, I have experimented with varying number of attributes, but no luck.
      I have googled in vain to find examples where context menus are built up using markup; all examples seem to be imperative (ActionScript) code, instead of declarative.

      Any ideas?