THANK YOU!!!! after reading this... If the NullPointerException is exactly on the statement you pointed out, then spinner_drawings must be null, suggesting something is going wrong with the loading of your layout.
and looking at my code again i realized that findViewById() should read saveOpenDialog.findViewByid() because the view is in a dialog. I never thought of that! i figured if there was a problem with that i would have got the error on that line. Thanks again Mark! On Tue, Jan 13, 2009 at 5:04 PM, Mark Murphy <[email protected]>wrote: > > Josh Dobbs wrote: > > 1. Have you called setContentView() before your call to > findViewById()? > > > > 2. Does your layout have a Spinner element with > > android:id="@+id/spinner_drawings"? > > > > > > Hi Mark, > > setContentView is called before i call findViewByid and the layout does > > have a spinner element with the proper name. > > If the NullPointerException is exactly on the statement you pointed out, > then spinner_drawings must be null, suggesting something is going wrong > with the loading of your layout. > > If the NullPointerException is in some nested call, deeper in the > innards of Android, triggered by the statement you pointed out, then > spinner_drawings is not null, and something else is afoot. > > -- > Mark Murphy (a Commons Guy) > http://commonsware.com > _The Busy Coder's Guide to Android Development_ Version 2.0 Available! > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

