Tab View Help

Hello,
I have a tab view in my application with many tabs on it, this is somple, when my user clicks the button it goes to a certain tab. But why doesnt this work?


on clicked theObject
	tell tab view "view"
		set current tab view item to tab view item "done"
	end tell
end on

I get the error:
Can’t make «class cTVI» of «class tabV» “view” into type reference. (-1700)

Thanks in advance

Hi,

I guess, the reference isn’t complete, the window is missing like

set current tab view item to tab view item “done” of window “main”

Nup :frowning: doesnt work still.

Here is the project file if you want to have a look around:
http://www.cns-world.com/software/tab.zip
(52kb Tab Views.xcodeproj in .zip format)

doesnt anyone use tab views in their apps?
:expressionless:

I think this is documented properly in xCode documentation, I think your reference needs to be more like this:

if name of theObject is "aButton" then
		tell tab view "tabViewBoxThing" of window "main"
			set the current tab view item to tab view item "whateverTab"
		end tell
end if