Tab view item problem

Hi Folks,

I have the following funny problem:

I try to switch the tabs of a tab view with the following code:


tell tab view "email" of box "email" of window "main"
set current tab view item to tab view item "inbox"
end tell

When I am in the tab view item “outbox” and try to call the “inbox” I will get a ns 4 error - alltough it is switching

When I try to call the inbox from a button (the button is in a different box), everything is working fine…

Can it be, that the code must be different when I try to call the inbox and the button is inside the tab (which means, I was pressing
a button on the tab view item “outbox” and want to switch to the “inbox”)?

Thanks for any feedback,

Stefan