Re: NSTimestampFormatter problem
Re: NSTimestampFormatter problem
- Subject: Re: NSTimestampFormatter problem
- From: Kevin Xiaowen Ren <email@hidden>
- Date: Thu, 02 Sep 2004 12:29:48 +1200
HI, I got problem after I use format.
I setup format in java code.
1. theFormatter = new NSTimestampFormatter("%d/%m/%Y");
2.
theFormatter.setDefaultFormatTimeZone(NSTimeZone.localTimeZone());
3.
theFormatter.setDefaultParseTimeZone(NSTimeZone.localTimeZone());
and setup WOTextField like
TextField1: WOTextField {
size = 10;
value= dateSelected;
formatter= theFormatter;
}
But When I open this WOComponent I got these error message:
java.lang.NullPointerException
[2004-09-02 12:20:18 NZST] <WorkerThread0> java.lang.NullPointerException
at
com.webobjects.foundation.NSTimeZone.__parseTimeZoneData(NSTimeZone.java:513)
at com.webobjects.foundation.NSTimeZone._initialize(NSTimeZone.java:982)
at
com.webobjects.foundation.NSTimeZone.secondsFromGMTForOffsetInSeconds(NSTimeZone.java:1308)
at
com.webobjects.foundation.NSTimestamp._timestampAdjustedForZone(NSTimestamp.java:1181)
at com.webobjects.foundation.NSTimestamp.<init>(NSTimestamp.java:284)
at
com.webobjects.foundation.NSTimestampFormatter$__NSSimpleDateFormat.parse(NSTimestampFormatter.java:1034)
at
com.webobjects.foundation.NSTimestampFormatter.parseObject(NSTimestampFormatter.java:492)
at java.text.Format.parseObject(Unknown Source)
at
com.webobjects.appserver._private.WOTextField._appendValueAttributeToResponse(WOTextField.java:100)
at
com.webobjects.appserver._private.WOInput.appendAttributesToResponse(WOInput.java:127)
at
com.webobjects.appserver._private.WOHTMLDynamicElement._appendOpenTagToResponse(WOHTMLDynamicElement.java:394)
at
com.webobjects.appserver._private.WOHTMLDynamicElement.appendToResponse(WOHTMLDynamicElement.java:419)
at
com.webobjects.appserver._private.WODynamicGroup.appendChildrenToResponse(WODynamicGroup.java:121)
at
com.webobjects.appserver._private.WODynamicGroup.appendToResponse(WODynamicGroup.java:130)
at com.webobjects.appserver.WOComponent.appendToResponse(WOComponent.java:922)
at
com.webobjects.appserver._private.WOComponentReference.appendToResponse(WOComponentReference.java:120)
at
com.webobjects.appserver._private.WODynamicGroup.appendChildrenToResponse(WODynamicGroup.java:121)
at
com.webobjects.appserver._private.WOForm.appendChildrenToResponse(WOForm.java:124)
at
com.webobjects.appserver._private.WOHTMLDynamicElement.appendToResponse(WOHTMLDynamicElement.java:423)
at com.webobjects.appserver._private.WOForm.appendToResponse(WOForm.java:118)
at
com.webobjects.appserver._private.WODynamicGroup.appendChildrenToResponse(WODynamicGroup.java:121)
at
com.webobjects.appserver._private.WODynamicGroup.appendToResponse(WODynamicGroup.java:130)
at com.webobjects.appserver.WOComponent.appendToResponse(WOComponent.java:922)
at
com.webobjects.appserver._private.WOComponentReference.appendToResponse(WOComponentReference.java:120)
at
com.webobjects.appserver._private.WODynamicGroup.appendChildrenToResponse(WODynamicGroup.java:121)
at
com.webobjects.appserver._private.WODynamicGroup.appendToResponse(WODynamicGroup.java:130)
at com.webobjects.appserver.WOComponent.appendToResponse(WOComponent.java:922)
If I comment out the line 3 in java code, it's no problem. Everything is fine.
Please tell me what's the reason?
thanks
kevin
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.