Re: NSDates, NSTimestamps and the Java-bridge
Re: NSDates, NSTimestamps and the Java-bridge
- Subject: Re: NSDates, NSTimestamps and the Java-bridge
- From: Ricardo Strausz <email@hidden>
- Date: Fri, 16 May 2003 16:08:35 -0500
On miircoles, mayo 14, 2003, at 16:15 America/Mexico_City, Art Isbell
wrote:
> On Wednesday, May 14, 2003, at 09:40 AM, Ricardo Strausz wrote:
>
>> On miircoles, mayo 14, 2003, at 13:36 America/Mexico_City, Art Isbell
>> wrote:
>>
>>> If I recall my ObjC, the correct form should be
>>>
>>> id eoq = [EOQualifier qualifierWithQualifierFormat:@"cliente=%@
>>> and fecha>=%@ and estado>0",[eo folio],desde];
>>>
>>> The argument list of qualifierWithQualifierFormat: includes the
>>> format
>>> string followed by n arguments, where n is the number of '%'-prefixed
>>> format characters in the format string.
>
>> The problem with such a sintaxis is that qualifierWithQualifierFormat
>> is expecting 2 arguments (an string and an array) so the run-time says
>> something like "does not recognizes selector".
>
> There used to be a method qualifierWithQualifierFormat:(NSString
> *)qualifierFormat arguments:(NSArray *)arguments. Maybe that's what
> you need.
>
Yap, in older versions of EOF (when it was truely ObjC) there was
something like that, but now EOQualifier only exists in the Java-side
of "the" bridge; in fact, the class most be inizialized (say, in some
awake) with a line of the form:
EOQualifier =
NSClassFromString(@"com.webobjects.eocontrol.EOQualifier");
Therefore, even I am writing in ObjC, I can only use those methods
defined for such a class; in this case
'qualifierWithQualifierFormat(String format, NSArray arguments)'...
since this method recives two arguments, it is supposed to be called,
from ObjC, by qualifierWithQualifierFormat:(NSString*)format
:(NSArray*)arguments.
Here is the problem: first, there are two NSArrays, one from Cocoa and
the other from Webobjects and they ARE NOT COMPATIBLE (e.g., one uses
nextObject and the other nextElement in their objectEnumerators);
second, NSString and String parse differently NSCalendarDates and
NSTimeStamps, respectively. In ObjC it asks for its "string
description", and in the Java side... I do not know.
Unfortunely, Cocoa/EO development is still full of inconcistencies...
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.