Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Posts: 51
Registered: ‎04-01-2009
My Device: Not Specified

can't retrieve a memo in the ApplicationMenuItem!

I've registed an ApplicationMenuItem in the memo,and it looks fine.But in 4.6 or 4.7 os, if I click the menu,in the Run()method, its context is null !  I can't retrive the context memo.So here is my code.They works fine in 4.2~4.5.



public class myMenu extends ApplicationMenuItem {
 public void registInstance() {

    ApplicationMenuItemRepository.MENUITEM_MEMO_LIST, this);


 public myMenu(int i) {
  // construtor

 public Object run(Object context) {
  // run

//in 4.6 or 4.7 ,context is null

 public String toString() {
  // toString
  return "myMemu";



Is is because the limitation of os ?

Please use plain text.
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: can't retrieve a memo in the ApplicationMenuItem!

I've seen this when trying to select a memo from the list screen. I believe that the Memo program is grouping the memos and the "inject" feature from the list screen is not smart enough to un-group the individual item, and it gets a cast exception internally - hence the null context.


However, if I open the memo, I can now successfully inject it.


Please use plain text.
Posts: 14,268
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: can't retrieve a memo in the ApplicationMenuItem!

Our development team is aware of this issue.  I do not have a work around to provide for this issue.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.