When helping in this topic I noticed something strange in my console.
I was just wondering if anyone of you when running the code below sees similar messages in the console:
set timeSlot to "15:24:17 - 16:24:17"
console messages
[code]Date extraction failed: could not parse type = TimeDuration, range = 1/19, matched string = “15:24:17 - 16:24:17”, value = 15:24:17 - 16:24:17
Subresults = {
(BeginTime:15:24:17)
(EndTime:16:24:17)
}
Date extraction failed: could not parse type = Timestamp, range = 1/19, matched string = “15:24:17 - 16:24:17”, value = 15:24:17 - 16:24:17
Subresults = {
(TimeDuration:15:24:17 - 16:24:17)
}[/code]
The weird thing is that in Yosemite the logging seems to be more excessive than in Mavericks, the logging starts when typing and compiling while in Mavericks it only logs when running. Is anyone familiar with this? Is there some kind of formatter applied when a string is set in AppleScript-editor? Another weird thing is that It doesn’t happen when the seconds of the times are both zero.
For the record: it’s an Script Editor message, not an AppleScript error or something.
My guess is it’s an automatic NSDataDetector kicking in in the Log pane, and not being able to successfully parse the string as a time range. The range reported in the message matches the date string’s offset in that pane, allowing for the initial “Result:” – that can’t be a coincidence.
Select type in the log pane and go to Edit → Substitutions → Data Detectors. It seems to be on by default; turn it off and the messages disappear. Unfortunately it doesn’t seem to be stored when you use Save as Default.