Problem with dateItems and math?
Posted: Sun Sep 29, 2019 10:54 pm
I've started a bit more indepth lesson about dateItems to go with the other tutorials I've put up, and ran across something I *think* is a bug.
If you add (or subtract) a number from an item of the dateItems, your supposed to get returned the increased item and all the other items increased as well.
That is probably poorly worded. If needed, I can try to explain it better
Anyway, I whipped up this little time machine demo. The above picture shows what I expect to happen... This is what happens after going large (and not all that large either!) I notice that it is the dateItems, and the items themselves are correct, but why is it showing the items instead of the formatted output as in the picture at the top?
The routine is simple enough...
And here is the stack -
Reproducible in 6.5 to 9.5.
If you add (or subtract) a number from an item of the dateItems, your supposed to get returned the increased item and all the other items increased as well.
That is probably poorly worded. If needed, I can try to explain it better

Anyway, I whipped up this little time machine demo. The above picture shows what I expect to happen... This is what happens after going large (and not all that large either!) I notice that it is the dateItems, and the items themselves are correct, but why is it showing the items instead of the formatted output as in the picture at the top?
The routine is simple enough...
Code: Select all
on mouseUp
put field 3 into tmpItems
put the hilitedButtonName of group 1 into tmpName
put the number of button tmpName into tmpNum
add field "addNum" to item tmpNum of tmpItems
convert tmpItems from dateItems to long date and long time
put tmpItems into field 4
set the itemDelimiter to space
put item 5 to 6 of field 4 into field 5
delete item 5 to 6 of field 4
end mouseUp