• 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: setNumberOfObjects in an NSArray
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: setNumberOfObjects in an NSArray


  • Subject: Re: setNumberOfObjects in an NSArray
  • From: Dev WO <email@hidden>
  • Date: Tue, 2 Aug 2005 22:26:58 +0200

Thanks a lot David,
I think this will work perfectly:)
I'll will create only one object for "now" to make sure datePosted and dateUpdated are completely identical when posted.
If I get problem implementing this, I'll come back:)


Thanks again David.

Xavier




On 2-Aug-05, at 3:04 PM, Dev WO wrote:


Hello David,
setting the dateUpdated to be equal to datePosted on creation might do the trick...
I've got to change a couple other stuf that was relying on a null dateUpdated, but this shouldn't be a problem and would solved pretty much everything:)
can I compare dates using == like if (datePosted == dateUpdated)?



If you are trying to test the date objects to see if they are the same time, that will probably not work (the two dates are probably *not* the same object) I'm assuming you are using NSTimestamp as the Attribute type for your dates. It inherits from java.util.data and gets the following methods:


boolean after(Date when) - Tests if this date is after the specified date.

boolean before(Date when) - Tests if this date is before the specified date.

int compareTo(Object o) - Compares this Date to another Object.

boolean equals(Object obj) - Compares two dates for equality.

Be careful, you may wish to test for equality based on a window (ie: ignore hours, minutes, and seconds so any date today will equal any other date today) but I'm sure you'll find something useful in those methods :-)

--
;david

--
David LeBer
Codebase Software Systems
site:   http://www.codebase.ca
blog: http://david.codebase.ca




_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >setNumberOfObjects in an NSArray (From: Dev WO <email@hidden>)
 >Re: setNumberOfObjects in an NSArray (From: David LeBer <email@hidden>)
 >Re: setNumberOfObjects in an NSArray (From: Dev WO <email@hidden>)
 >Re: setNumberOfObjects in an NSArray (From: David LeBer <email@hidden>)

  • Prev by Date: Re: PDF APIs?
  • Next by Date: Re: Reusable Component Tricks...
  • Previous by thread: Re: setNumberOfObjects in an NSArray
  • Next by thread: Re: setNumberOfObjects in an NSArray
  • Index(es):
    • Date
    • Thread