• 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: Dates via the Java-Bridge
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dates via the Java-Bridge


  • Subject: Re: Dates via the Java-Bridge
  • From: Strausz Riccardo <email@hidden>
  • Date: Sun, 2 Feb 2003 12:43:41 -0600

I found the solution:

I had to import the class via
NSTimestamp = NSClassFromString(@"com.webobjects.foundation.NSTimestamp");


then instanciate it, say with
today = [NSTimestamp new];

and finally assigin it, via
[eo setFecha:today];

Thanks to those who try to help, any way
dino

On viernes, ener 31, 2003, at 20:23 America/Mexico_City, Art Isbell wrote:

On Friday, January 31, 2003, at 02:20  PM, Ricardo Strausz wrote:

I am trying to develope a Cocoa EOF app (WO5.2) in OSXS 10.2.

Venturing where few dare tread :-)

When inserting a new eo, I want to set a property (called `fecha') which stores the moment of creation. I tried the following code:

[dg insert]; // dg is the DisplayGroup
eo = [dg selectedObject];
[eo setFecha:[NSDate date]];

but it returns the following error:

2003-01-31 18:12:35.292 CTalma[1167] *** NSRunLoop: ignoring exception 'java/lang/ClassCastException' (reason 'com.apple.cocoa.foundation.NSDate') that raised during delayed perform of target 547344 and selector > '_processEndOfEventNotification:'

I suppose it is becouse in the object generated by EOModeler (Tarticulo.java) the key 'fecha' is handled as an NSTimestamp.

If you add the "Value Class (Obj-C)" column to the attributes view in EOModeler, the Objective-C value class that corresponds to Java's NSTimestamp is NSCalendarDate. I'd try that instead of NSDate.

Art, I did try that also, but did not work... thanks any way.


Art
http://homepage.mac.com/aisbell/
_______________________________________________
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.

  • Prev by Date: Re: Uninstall or downgrade of ProjectBuilder
  • Next by Date: Re: Error with Creating new Webobjects Java Class file
  • Previous by thread: Re: Uninstall or downgrade of ProjectBuilder
  • Next by thread: Re: Error with Creating new Webobjects Java Class file
  • Index(es):
    • Date
    • Thread