Skip to content

Commit

Permalink
Reset menu reference when remove() call is made
Browse files Browse the repository at this point in the history
  • Loading branch information
sterlingwes committed Jun 13, 2012
1 parent fcde793 commit c8d3207
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Smartphone/SendMenu/README.md
Expand Up @@ -44,7 +44,7 @@ Context JSON Keys:

### Methods

#### blackberry.ui.sendmenu.add(TYPE,CONTEXT[,GET_ALL,ORDERING,PRIORITY,FILTER])
#### blackberry.ui.sendmenu.add( TYPE, CONTEXT [, GET_ALL, ORDERING, PRIORITY, FILTER ] )

Adds the Send Menu to the app's menu.

Expand All @@ -57,11 +57,11 @@ Arguments:
* `PRIORITY` (optional) is an integer indicating menu priority (defaults to 0)
* `FILTER` (optional) is a JSON string similar to `CONTEXT` which replaces values in `CONTEXT` based on command filters (in testing this had no affect on commands I thought it would, ie: Twitter or SMS limits), leave null for none

### blackberry.ui.sendmenu.remove()
#### blackberry.ui.sendmenu.remove()

Removes the Send Menu previously added in the current application session (the menu will not persist between sessions).

### blackberry.ui.sendmenu.setLabel(STRING_LABEL)
#### blackberry.ui.sendmenu.setLabel( STRING_LABEL )

Sets the parent menu label for the sub menu containing all send commands. Defaults to `Share`.

Expand Down
Expand Up @@ -176,6 +176,7 @@ public Object invoke(Object obj, Object[] args) throws Exception
{
MainScreen screen = (MainScreen) SendMenuExtension.getBrowserField().getScreen();
screen.removeMenuItem(menu.getMenuItem());
menu = null;
return Boolean.TRUE;
}

Expand Down

0 comments on commit c8d3207

Please sign in to comment.