NSDates, NSTimestamps and the Java-bridge
NSDates, NSTimestamps and the Java-bridge
- Subject: NSDates, NSTimestamps and the Java-bridge
- From: Ricardo Strausz <email@hidden>
- Date: Mon, 12 May 2003 21:52:54 -0500
Hola tod@s!
I hope some one can help me with this one:
I nead to build a qualifier which bounds some dates... I am writing
almost everything in ObjC (doing Cocoa/EO) but some objects
initializers (like NSTimestamp) don't jump the bridge, so I have also a
Util.java object in charge of those pins...
the code is:
- (NSArray*)facturasDe:(id)eo desde:(NSCalendarDate*)desde
{
[desde setCalendarFormat:@"%d %m %Y"];
id nst = [Util nst:[desde description]]; //this is an NSTimestamp
created by Util.java
NSString* nss = [NSString stringWithFormat:@"fecha>='%@'",[nst
toString]];
id eoq = [EOQualifier qualifierWithQualifierFormat:nss:nil];
[[dgFacturas dataSource] setAuxiliaryQualifier:eoq];
[dgFacturas fetch:self];
return [dgFacturas displayedObjects];
}
public NSTimestamp nst(String dateString){
NSTimestampFormatter formatter=new NSTimestampFormatter("%d %m
%Y");
ParsePosition pp = new ParsePosition(0);
NSTimestamp
myNSTimestamp=(NSTimestamp)formatter.parseObject(dateString,pp);
return myNSTimestamp;
}
and the error is:
** Error JDBCColumn for setting date type for 2003-04-12 05:00:00
Etc/GMT- class = class java.lang.String.
Dino
http://homepage.mac.com/strausz
_______________________________________________
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.