(dirty solved): NSDates, NSTimestamps and the Java-bridge
(dirty solved): NSDates, NSTimestamps and the Java-bridge
- Subject: (dirty solved): NSDates, NSTimestamps and the Java-bridge
- From: Ricardo Strausz <email@hidden>
- Date: Wed, 14 May 2003 14:49:09 -0500
Gracias Joaquin!
Thanks Art, Seejo, Dirk!
I'd found a solution... dirty but it works.
Basically I have to assgin the qualifier in the Java side.
I hope Apple is doing something to get better Cocoa/EO... and the
Java-Bridge!
Here is the code:
- (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
[Util setAuxiliaryQualifierTo:[dgFacturas dataSource]:eo:nst];
[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;
}
public void setAuxiliaryQualifierTo(EODatabaseDataSource ds,
Facturas eo, NSTimestamp nst){
NSMutableArray nsma = new NSMutableArray();
nsma.addObject(eo.folio());
nsma.addObject(nst);
EOQualifier eoq =
EOQualifier.qualifierWithQualifierFormat("cliente=%@ and fecha>=%@ and
estado>0",nsma);
ds.setAuxiliaryQualifier(eoq);
}
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.