Why not do this?
if (NumCanShootValue == null || NumCanShootValue.equals(""))
Of course, that is assuming NumCanShootValue is a String.
Thanks,
Justin
----------------------------------------------------------------------
There are only 10 types of people in the world...
Those who know binary and those who don't.
----------------------------------------------------------------------
On Thu, Sep 24, 2009 at 1:49 AM, Jeffrey <[email protected]> wrote:
>
> Well, I got it working but I'm pretty sure there is an easier way to
> do it. I basically just add a string variable containing "0", check to
> make sure the string coming from the EditText isn't equal to "0", and
> then parseInt the string and divide it by 10 to get the original
> number. If anyone knows of an easier way to get this done that would
> be great!
>
> On Sep 24, 12:08 am, Jeffrey <[email protected]> wrote:
> > I'm trying to make an error message pop up if the user leaves an entry
> > field blank instead of a force close. Right now I've got this:
> >
> > if (NumCanShootValue == null) {
> > String Failure = "Please Fill In required
> Fields.";
> > Toast.makeText(QuickShoot.this, Failure,
> > Toast.LENGTH_SHORT).show();
> > } else {blah blah blah}
> >
> > This doesn't work, and I tried a .hasNext() but I don't know what to
> > attach it to. ".hasNext()" doesn't work.
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" 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-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---