• 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
Why aren't my textural date pickers working?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why aren't my textural date pickers working?


  • Subject: Why aren't my textural date pickers working?
  • From: Brian Christmas <email@hidden>
  • Date: Thu, 21 Aug 2014 13:37:51 +1000

G'day scripters

This might actually be my last request for help, hopefully, at least for some time.

In my project, I'm giving the user the choice of type of date picker. I'm having problems getting the terminology for the contextual date picker right however. I'm assuming I  should be able to set the values with NSDates, but the handler is failing when it try to 'setDateValue'.

Shane's examples from Explored 4 work, but mine doesn't , but Shane does not use the 'setDateValue' in the example.

I don't get past '5' and '7' in this handler. I've tried with double brackets, and without the curly brackets, but my basic terminology must be incorrect.

The date pickers assigned properties are datePickerStartAS  &  datePickerStartNS

Any guidance please?

Regards

Santa

on switchOverTimes_(sender)
try
say my datePickerTypeFlag as text
if my datePickerTypeFlag then
say 1
set my datePickerStartNSValue to (my datePickerStartNS's dateValue())
say 2
set my datePickerFinishNSValue to (my datePickerFinishNS's dateValue())
say 3
set temp to (extras's fordNSDateToASDate_(my datePickerStartNSValue))
set my datePickerStartAS to (((temp) as date) as text)
say 4
set temp to (extras's fordNSDateToASDate_(my datePickerFinishNSValue))
set my datePickerFinishAS to (((temp) as date) as text)
say 5
my datePickerStartAS's setDateValue_({my datePickerStartNSValue})
say 6
my datePickerFinishAS's setDateValue_({my datePickerFinishNSValue})
else
say 7
set datePickerStartNSValue to (my datePickerStartAS's dateValue())
say 8
set datePickerFinishNSValue to (my datePickerFinishAS's dateValue())
say 9
set temp to (extras's fordNSDateToASDate_(my datePickerStartNSValue))
set my datePickerStartAS to (((temp) as date) as text)
say 10
set temp to (extras's fordNSDateToASDate_(my datePickerFinishNSValue))
set my datePickerFinishAS to (((temp) as date) as text)
say 11
my datePickerStartNS's setDateValue_({my datePickerStartNSValue})
say 12
my datePickerFinishNS's setDateValue_({my datePickerFinishNSValue})
end if
set temp to ((extras's fordNSDateToASDate_(my datePickerStartNSValue)) as date) as text
display dialog "NS date" & return & return & temp as text
display dialog "applescript date" & return & return & ((my datePickerStartASValue as date) as text)
on error errmsg
display dialog "switchOverTimes " & errmsg & return & return & "p = " & p
end try
end switchOverTimes_
 _______________________________________________
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

  • Follow-Ups:
    • Re: Why aren't my textural date pickers working?
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: Need help, trying to populate a plain Table
  • Next by Date: Re: Why aren't my textural date pickers working?
  • Previous by thread: Re: Need help, trying to populate a plain Table
  • Next by thread: Re: Why aren't my textural date pickers working?
  • Index(es):
    • Date
    • Thread