okay then, will do try or i'll probably put them in the same class with the list view cause its the safest option
Thanks On Mar 18, 9:11 pm, Mark Murphy <[email protected]> wrote: > ccal wrote: > > Oops.... Okay, I'll just paste the only error message part here. this > > is for the one with toast: > > > 03-18 19:29:57.360: DEBUG/AndroidRuntime(21989): Shutting down VM > > 03-18 19:29:57.401: WARN/dalvikvm(21989): threadid=3: thread exiting > > with uncaught exception (group=0x4001b188) > > 03-18 19:29:57.401: ERROR/AndroidRuntime(21989): Uncaught handler: > > thread main exiting due to uncaught exception > > 03-18 19:29:57.421: ERROR/AndroidRuntime(21989): > > java.lang.NullPointerException > > 03-18 19:29:57.421: ERROR/AndroidRuntime(21989): at > > android.widget.Toast.<init>(Toast.java:89) > > 03-18 19:29:57.421: ERROR/AndroidRuntime(21989): at > > android.widget.Toast.makeText(Toast.java:231) > > 03-18 19:29:57.421: ERROR/AndroidRuntime(21989): at > > myandroid.project.AlarmMenu$1.onMenuItemClick(AlarmMenu.java:60) > > 03-18 19:29:57.421: ERROR/AndroidRuntime(21989): at > > com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java: > > 133) > > 03-18 19:29:57.421: ERROR/AndroidRuntime(21989): at > > com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java: > > 855) > > 03-18 19:29:57.421: ERROR/AndroidRuntime(21989): at > > com.android.internal.view.menu.MenuDialogHelper.onClick(MenuDialogHelper.java: > > 129) > > 03-18 19:29:57.421: ERROR/AndroidRuntime(21989): at > > com.android.internal.app.AlertController$AlertParams > > $3.onItemClick(AlertController.java:884) > > 03-18 19:29:57.421: ERROR/AndroidRuntime(21989): at > > android.widget.AdapterView.performItemClick(AdapterView.java:284) > > 03-18 19:29:57.421: ERROR/AndroidRuntime(21989): at > > android.widget.ListView.performItemClick(ListView.java:3285) > > 03-18 19:29:57.421: ERROR/AndroidRuntime(21989): at > > android.widget.AbsListView$PerformClick.run(AbsListView.java:1640) > > 03-18 19:29:57.421: ERROR/AndroidRuntime(21989): at > > android.os.Handler.handleCallback(Handler.java:587) > > 03-18 19:29:57.421: ERROR/AndroidRuntime(21989): at > > android.os.Handler.dispatchMessage(Handler.java:92) > > 03-18 19:29:57.421: ERROR/AndroidRuntime(21989): at > > android.os.Looper.loop(Looper.java:123) > > 03-18 19:29:57.421: ERROR/AndroidRuntime(21989): at > > android.app.ActivityThread.main(ActivityThread.java:4363) > > 03-18 19:29:57.421: ERROR/AndroidRuntime(21989): at > > java.lang.reflect.Method.invokeNative(Native Method) > > 03-18 19:29:57.421: ERROR/AndroidRuntime(21989): at > > java.lang.reflect.Method.invoke(Method.java:521) > > 03-18 19:29:57.421: ERROR/AndroidRuntime(21989): at > > com.android.internal.os.ZygoteInit > > $MethodAndArgsCaller.run(ZygoteInit.java:860) > > 03-18 19:29:57.421: ERROR/AndroidRuntime(21989): at > > com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) > > 03-18 19:29:57.421: ERROR/AndroidRuntime(21989): at > > dalvik.system.NativeStart.main(Native Method) > > > This part: > > > 03-18 19:29:57.421: ERROR/AndroidRuntime(21989): at > > myandroid.project.AlarmMenu$1.onMenuItemClick(AlarmMenu.java:60) > > > points to toast part. > > > Any ideas? > > You have a NullPointerException: > > > 03-18 19:29:57.421: ERROR/AndroidRuntime(21989): > > java.lang.NullPointerException > > Somehow, AlarmMenu.this is null. I do not quite understand how. > > As I wrote earlier: > > I have not tried setOnMenuItemClickListener(). You might consider > switching to onContextItemSelected(), as shown here: > > http://github.com/commonsguy/cw-android/tree/master/Database/Constants/ > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://twitter.com/commonsguy > > Android App Developer Books:http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe from this group, send email to android-developers+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

