You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
functionshowMenu(e){varitem=$.section.getItemAt(e.itemIndex);varpopup=require('nc.popup');varmenu=popup.createPopupMenu({options: ['Item A','Item B','Item C'],view: item.icon});menu.addEventListener('click',function(e){alert('Selected item: '+e.index);});menu.addEventListener('dismiss',function(){alert('popup menu has been dismissed');});menu.show();}
This is the error shown in Appcelerator's console:
[ERROR] : KrollProxy: (main) [1272,5745] Error creating proxy
[ERROR] : KrollProxy: java.lang.IllegalArgumentException: 'view' is required
[ERROR] : KrollProxy: at nc.popup.PopupMenuProxy.handleCreationDict(PopupMenuProxy.java:65)
[ERROR] : KrollProxy: at org.appcelerator.kroll.KrollProxy.handleCreationArgs(KrollProxy.java:196)
[ERROR] : KrollProxy: at org.appcelerator.kroll.KrollProxy.setupProxy(KrollProxy.java:129)
[ERROR] : KrollProxy: at org.appcelerator.kroll.KrollProxy.createProxy(KrollProxy.java:137)
[ERROR] : KrollProxy: at org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method)
[ERROR] : KrollProxy: at org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:62)
[ERROR] : KrollProxy: at org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:921)
[ERROR] : KrollProxy: at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1144)
[ERROR] : KrollProxy: at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:363)
[ERROR] : KrollProxy: at android.os.Handler.dispatchMessage(Handler.java:98)
[ERROR] : KrollProxy: at android.os.Looper.loop(Looper.java:154)
[ERROR] : KrollProxy: at android.app.ActivityThread.main(ActivityThread.java:6119)
[ERROR] : KrollProxy: at java.lang.reflect.Method.invoke(Native Method)
[ERROR] : KrollProxy: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
[ERROR] : KrollProxy: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
The text was updated successfully, but these errors were encountered:
I tried using this module with ListViews but the app crashes when trying to show the menu.
I have an ItemTemplate which looks like this:
And then here's the showMenu function:
This is the error shown in Appcelerator's console:
The text was updated successfully, but these errors were encountered: