• 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: What is the best way to handle invalid values from a WOTextField?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What is the best way to handle invalid values from a WOTextField?


  • Subject: Re: What is the best way to handle invalid values from a WOTextField?
  • From: Andrew Lindesay <email@hidden>
  • Date: Thu, 17 Jul 2008 12:59:12 +1200

I have patched-in a custom WODynamicElement and do this in the Application class to replace the broken WO 5.4.2 one...

	public WOElement dynamicElementWithName(
			String aName,
			NSDictionary<String,WOAssociation> someAssociations,
			WOElement anElement,
			NSArray<String> aLanguageArray)
	{
		if(aName.endsWith(".WOTextField"))
			aName = "TemporaryWOTextField";

return super.dynamicElementWithName(aName, someAssociations, anElement, aLanguageArray);
}


This seems like a workable solution for now. I'd be happy to email anybody the class I made.

cheers.

Now, in WO 5.4 this is no longer true. When the formatter fails to parse a string it still gets pushed into the target object. As this is documented is must somehow be considered "expected" behavior. Unfortunately this breaks all our apps, as no class handles those invalid strings.

Whoa! Where is this documented? I also depend on this.

I don't see this mentioned in the 5.4.2 release notes. Is there a bug report already? How is this meant to work now?

Also... what does "it" mean as in "...a string it still..." when the parse-result should be a timestamp?

When it fails to parse, it tries to set the original String as the date. Which may cause one to say, "WTF?!!?".

___ Andrew Lindesay www.lindesay.co.nz

_______________________________________________
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: 
 >Re: What is the best way to handle invalid values from a WOTextField? (From: Lachlan Deck <email@hidden>)
 >Re: What is the best way to handle invalid values from a WOTextField? (From: Andrew Lindesay <email@hidden>)
 >Re: What is the best way to handle invalid values from a WOTextField? (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: Not a wocomponent?
  • Next by Date: What is "error while removing bottom of undo stack"
  • Previous by thread: Re: What is the best way to handle invalid values from a WOTextField?
  • Next by thread: Re: What is the best way to handle invalid values from a WOTextField?
  • Index(es):
    • Date
    • Thread