tabViewItem's label

I set up a delegate for tabView and I’m now trying to get the label of the tab. The method gets called and I get the first log but how do I get the label?


    on tabView_didSelectTabViewItem_(sender)
        tell me to log "Tab view changed"
        tell me to log  myTabView's tabviewItem()'s label()
    end tabView_didSelectTabViewItem_

Hi.

the sender is the selected tab view item


on tabView_didSelectTabViewItem_(sender)
tell me to log "Tab view changed"
tell me to log sender's label()
end tabView_didSelectTabViewItem_

It also needed to have selectedTabViewItem()'s before label()


    on tabView_didSelectTabViewItem_(sender)
        tell me to log "Tab view changed"
        tell me to log  sender's selectedTabViewItem()'s label()
    end tabView_didSelectTabViewItem_

Thanks!

not really, you missed a parameter in the call, the correct syntax is


    on tabView_didSelectTabViewItem_(tabView, tabViewItem)
        tell me to log "Tab view changed"
        tell me to log tabViewItem's label()
    end tabView_didSelectTabViewItem_

oh wow! That makes sense now… Thanks for pointing that out.