• 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: NSDates, NSTimestamps and the Java-bridge
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDates, NSTimestamps and the Java-bridge


  • Subject: Re: NSDates, NSTimestamps and the Java-bridge
  • From: Seejo Pylappan <email@hidden>
  • Date: Tue, 13 May 2003 21:09:43 -0400

Couple of things.

1. Like Art said you should be using NSCalendarDate on the Obj-C side.
You are going unnecessarily to and fro from the bridge for the
NSTimeStamp. A NSCalendarDate is used on the Obj-C side to represent
the NSTimestamp in the Java side. So in your case on the ObjC side you
are creating calling  [Util nst:[desde description]];  which creates a
NSTimestamp on the java side, which is actually a NSCalendarDate on the
ObjC.... So use NSCalendarDate.

2. I have not seen the original code you sent (accidently deleted :-( )
but what are you doing with the nss string? are you using it to create
a EOQualifier? I am a little confused, you have the nss string in the
Obj-C side but your backtrace is in the java code. What are you doing
with nss string? I would suggest either use this to create the
qualifier in Obj-C :

	[EOQualifier qualifierWithQualifierFormat:@"%@ >= %@", @"fetcha",
calendarDate];

or change the nss to:

	NSString* nss = [NSString stringWithFormat:@"fecha >= %@",
calendarDate];


-Seejo


>>      NSString* nss = [NSString stringWithFormat:@"fecha>=%@", nst];



On Tuesday, May 13, 2003, at 07:28  PM, Ricardo Strausz wrote:

> Thanks!
> I'd tried that, but now the error is:
>
> 2003-05-13 18:26:10.929 Clientes[993]
> com/webobjects/foundation/NSForwardException: Lexical error at line 1,
> column 35.  Encountered: ":" (58), after : ""
> Stack Trace:
> com.webobjects.foundation.NSForwardException for
> com.webobjects.eocontrol._private.TokenMgrError: Lexical error at line
> 1, column 35.  Encountered: ":" (58), after : ""
> 	at
> com.webobjects.eocontrol._private._EOQualifierParserTokenManager.getNex
> tToken(_EOQualifierParserTokenManager.java:1019)
> 	at
> com.webobjects.eocontrol._private._EOQualifierParser.jj_ntk(_EOQualifie
> rParser.java:1002)
> 	at
> com.webobjects.eocontrol._private._EOQualifierParser.parseValueList(_EO
> QualifierParser.java:501)
> 	at
> com.webobjects.eocontrol._private._EOQualifierParser.RelOpExpression(_E
> OQualifierParser.java:651)
> 	at
> com.webobjects.eocontrol._private._EOQualifierParser.Expression(_EOQual
> ifierParser.java:594)
> 	at
> com.webobjects.eocontrol._private._EOQualifierParser.parseLogicalExpres
> sion(_EOQualifierParser.java:885)
> 	at
> com.webobjects.eocontrol.EOQualifier.qualifierWithQualifierFormat(EOQua
> lifier.java:938)
>
> Any idea?
>
>
> On martes, mayo 13, 2003, at 03:13 America/Mexico_City, Art Isbell
> wrote:
>
>> On Monday, May 12, 2003, at 04:52  PM, Ricardo Strausz wrote:
>>
>>>      id nst = [Util nst:[desde description]]; //this is an
>>> NSTimestamp
>>> created by Util.java
>>>      NSString* nss = [NSString stringWithFormat:@"fecha>='%@'",[nst
>>> toString]];
>>
>>
>>> and the error is:
>>>
>>>   ** Error JDBCColumn for setting date type for 2003-04-12 05:00:00
>>> Etc/GMT- class = class java.lang.String.
>>
>> 	Your qualifier operator is ">=", yet the value being compared is a
>> string rather than a NSTimestamp.  This doesn't seem correct.  Would
>> this work?
>>
>>      NSString* nss = [NSString stringWithFormat:@"fecha>=%@", nst];
>>
>> 	Note that I removed the single quotes surrounding the %@.  EOF
>> should take care of quoting.
>>
>> Aloha,
>> Art
>> _______________________________________________
>> 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.
> _______________________________________________
> 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.
_______________________________________________
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.

References: 
 >Re: NSDates, NSTimestamps and the Java-bridge (From: Ricardo Strausz <email@hidden>)

  • Prev by Date: Re: NSDates, NSTimestamps and the Java-bridge
  • Next by Date: Fwd: Beginner - GuestBook
  • Previous by thread: (dirty solved): NSDates, NSTimestamps and the Java-bridge
  • Next by thread: Re: NSDates, NSTimestamps and the Java-bridge
  • Index(es):
    • Date
    • Thread