• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Another simple problem I am clueless about...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Another simple problem I am clueless about...


  • Subject: Re: Another simple problem I am clueless about...
  • From: Kevin Windham <email@hidden>
  • Date: Fri, 16 Mar 2007 19:15:29 -0500


On Mar 16, 2007, at 6:48 PM, Chuck Hill wrote:


On Mar 16, 2007, at 2:23 PM, Kevin Windham wrote:

I have a User object with an email() method. This is the standard boilerplate generated by EOModeler from my User table.

public String email() {
        return (String)storedValueForKey("email");
}

I have a registration page with a field on the page bound to user.email and a method called fieldsValidate(). When I get to the line ckEmail = user.email(); I get a null pointer exception. user.email() is returning null. I am not sure why? The registerNewUser method works fine if I take out the fieldsValidate (). Can someone hit me with the clue-by-4.

Is it null if you type something into the email field on the form? If you don't type in anything, WO makes the value a null, not an empty string. Is that where you are getting hung up.

Darn. I guess what you don't know can hurt you. I was expecting the empty string and the function declared a string as it's return value, so it seems odd to me that it's not, but at least I know now. I guess this is one of those semantic gotchas.


Thanks Chuck.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Another simple problem I am clueless about... (From: Kevin Windham <email@hidden>)
 >Re: Another simple problem I am clueless about... (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: Another simple problem I am clueless about...
  • Next by Date: investigating mysterious death
  • Previous by thread: Re: Another simple problem I am clueless about...
  • Next by thread: investigating mysterious death
  • Index(es):
    • Date
    • Thread