Mail.app v2.0 (Tiger) AS bugs?

Hello

I think Tiger’s Mail may have some bugs in its Applescript interface. I’m trying to get the Mailbox that the message lives in (coz a smart mailbox won’t tell you). I can get the message id of a selected message, say, but trying to get the message mailbox turns up blank (literally!)…

Select at least one message in Mail, then run this script. :

tell application "Mail"
	set msgs to the selected messages of the front message viewer
	set msg1 to the first item of msgs
	-- return id of msg1 -- this works
	return mailbox of msg1 -- this gives me nothing
end tell

Similarly, select no messages in Mail. (Select a mailbox you haven’t been in for a while.) Now try

tell application "Mail" to set sel to the selected messages of the front message viewer

Nothing! Not even an empty list, as (I would expect) should happen. So you can’t now say

get the count of sel

to check if you’ve got any items because sel hasn’t been defined yet!

I’m puzzled. Thanks for any light anyone can shed.

Will Robertson