Re: NSTimestampFormatter problem
Re: NSTimestampFormatter problem
- Subject: Re: NSTimestampFormatter problem
- From: Chuck Hill <email@hidden>
- Date: Wed, 1 Sep 2004 17:26:36 -0700
I've only ever used the first line of code. I've never had the need to
change the timezone.
Chuck
On Sep 1, 2004, at 5:29 PM, Kevin Xiaowen Ren wrote:
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.jav
a:513)
at
com.webobjects.foundation.NSTimeZone._initialize(NSTimeZone.java:982)
at
com.webobjects.foundation.NSTimeZone.secondsFromGMTForOffsetInSeconds(N
STimeZone.java:1308)
at
com.webobjects.foundation.NSTimestamp._timestampAdjustedForZone(NSTimes
tamp.java:1181)
at com.webobjects.foundation.NSTimestamp.<init>(NSTimestamp.java:284)
at
com.webobjects.foundation.NSTimestampFormatter$__NSSimpleDateFormat.par
se(NSTimestampFormatter.java:1034)
at
com.webobjects.foundation.NSTimestampFormatter.parseObject(NSTimestampF
ormatter.java:492)
at java.text.Format.parseObject(Unknown Source)
at
com.webobjects.appserver._private.WOTextField._appendValueAttributeToRe
sponse(WOTextField.java:100)
at
com.webobjects.appserver._private.WOInput.appendAttributesToResponse(WO
Input.java:127)
at
com.webobjects.appserver._private.WOHTMLDynamicElement._appendOpenTagTo
Response(WOHTMLDynamicElement.java:394)
at
com.webobjects.appserver._private.WOHTMLDynamicElement.appendToResponse
(WOHTMLDynamicElement.java:419)
at
com.webobjects.appserver._private.WODynamicGroup.appendChildrenToRespon
se(WODynamicGroup.java:121)
at
com.webobjects.appserver._private.WODynamicGroup.appendToResponse(WODyn
amicGroup.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.appendChildrenToRespon
se(WODynamicGroup.java:121)
at
com.webobjects.appserver._private.WOForm.appendChildrenToResponse(WOFor
m.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.appendChildrenToRespon
se(WODynamicGroup.java:121)
at
com.webobjects.appserver._private.WODynamicGroup.appendToResponse(WODyn
amicGroup.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.appendChildrenToRespon
se(WODynamicGroup.java:121)
at
com.webobjects.appserver._private.WODynamicGroup.appendToResponse(WODyn
amicGroup.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.