I tried that an get a null pointer:
public void addOverflowMenuCommands(final BJBForm f) {
Command c = f.getToolbar().addMaterialCommandToOverflowMenu("View
Cart", FontImage.MATERIAL_SHOPPING_CART, (ActionListener) (ActionEvent evt)
-> {
ViewCartForm viewcart = new ViewCartForm().init();
viewcart.setBackForm(f);
viewcart.show();
});
Button b = f.getToolbar().findCommandComponent(c);
if(b == null) System.err.println("eek");
.....
On Wednesday, July 6, 2016 at 3:33:03 PM UTC+10, Shai Almog wrote:
>
> Use:
>
> Command cmd = f.getToolbar().addMaterialCommandToOverflowMenu(....
> Button cmp = f.getToolbar().findCommandComponent(cmd);
>
>
>
--
You received this message because you are subscribed to the Google Groups
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit
https://groups.google.com/d/msgid/codenameone-discussions/0e924f49-7ca3-42de-b48a-5d2a69e51173%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.