On Sep 28, 2012, at 16:38, Axel Luttgens < email@hidden> wrote: But I take the opportunity to ask about an increasing usage I could observe here, which I don't quite understand.
Why such a convoluted access:
tell (some message viewer whose index is 1)
and not just: tell front message viewer or just: tell message viewer 1
______________________________________________________________________
Hey Axel,
We've had quite a lot of trouble referencing the front message viewer properly for some years as you may remember. In its case front is not front unless there is only one.
If you have more than one open front will reference the first one that was opened rather than the actual one that's in front.
A nasty bug that has remained unfixed for a very long time now.
Tell (some message viewer whose index is 1) is a tricky way someone discovered to always reference the front message viewer. (I think I got the code originally from Luther.) This method saves a step from item 1 of (message viewers whose index is 1).
Actually your question helps me, because I think I can case for one/more-than-one and avoid having to use a work-around most of the time.
Every time I select more than one message in a message viewer and produce a stack in the preview-pane the 1-index is lost.
Try selecting several items and then running this:
tell application "Mail" {index, name} of message viewers end tell
Then either close the preview-pane or select only 1 item and run it again.
I think your old recursive handler for finding the smallest index number might be the least intrusive work-around, but I'll have to dig it out and test for awhile.
This is a nasty new bug in Mail 6.1.
-- Best Regards, Chris
|