08-05-2009 04:07 PM
Hi,
I would like to know why I can't open a Dialog or a PopupScreen from a menuitem in the File Explorer.
Using the debugger I can see that there is no error ocurring and the execution get there in the Dialog.alert(""),
is there any solution?
Solved! Go to Solution.
08-10-2009 03:06 AM
08-10-2009 08:17 AM
08-10-2009 08:23 AM
08-10-2009 09:24 AM
Ok,
this is what I use to register the MenuItem (and it is shown in the FileExplorer):
ApplicationMenuItemRepository instance = ApplicationMenuItemRepository.getInstance(); ApplicationDescriptor apd = ApplicationDescriptor.currentApplicationDescriptor
(); instance.addMenuItem(ApplicationMenuItemRepository .MENUITEM_FILE_EXPLORER_BROWSE, myMenuitem, apd, "image/jpg");
And this is my MenuItem:
public class TwiThisMenuItem extends ApplicationMenuItem { public TwiThisMenuItem(int order) { super(order); } public String toString() { return "Twit This!"; } public Object run(final Object context) { Application.getUiApplication().invokeLater(new Runnable() { public void run() { Dialog.alert("Test"); // This doesn't work. } }); return context; }}
08-10-2009 09:40 AM
Check this KB article.