Re: Date pickers
Re: Date pickers
- Subject: Re: Date pickers
- From: Deivy Petrescu <email@hidden>
- Date: Tue, 09 Mar 2010 18:58:03 -0500
On 09/03/2010, at 18:44 , Shane Stanley wrote:
> On 10/3/10 10:32 AM, "Deivy Petrescu" <email@hidden> wrote:
>
>> How do you use that.
>> I can not make it work.
>
> Assuming you have an NSDate, presumably it's something like:
>
> set newNSDate to oldNSDate's dateByAddingTimeInterval(24 * 60 * 60)
>>
>> Also, there is another method:
>>
>> - (id)initWithTimeInterval:(NSTimeInterval)seconds sinceDate:(NSDate *)refDate
>>
>> Can you use this with ASOC? How?
>
> Probably:
>
> set newNSDate to current application's NSDate's alloc()'s
> initWithTimeInterval_sinceDate_(24 * 60 *60, oldNSDate)
>
>
> --
> Shane Stanley <email@hidden>
> AppleScript Pro, April 2010, Florida <http://www.applescriptpro.com>
This works:
ASObjC List <email@hidden>
set zdate to current application's class "NSDate"'s |date|()
set d5 to 3600 * 24 * 5
return zdate's dateByAddingTimeInterval_(d5)
However this does not!
set zdate to (what_date's dateValue()) -- gets date value from date field
set d5 to 3600 * 24 * 5
return zdate's dateByAddingTimeInterval_(d5)
-->Can’t make «class ocid» id «data kptr00000000A055590002000000» into type Unicode text.
I thought dateValue() would make zdate into an NSDate. Apparently I am wrong.
Deivy Petrescu
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden