Hi All.
Getting on quite well with applescriptobjc thanks to Shane Stanley’s book. However, I’ve suddenly come up against a problem I can’t quite solve regarding selecting tab view items.
In the past using ASS I used to use something like the following to select a tab view item:
set tab view item “Info_Tab” of tab view “Main_Tab” to do xyz.
I can’t seem to do this now using applescriptobjc. Everything is connected correctly in xCode and Interface Builder but it won’t seem to select any tab view items using the following method:
script Tab_TestAppDelegate
property parent : class “NSObject”
property myWindow : missing value
property myTabView : missing value
property tabViewItem1 : missing value
property tabViewItem2 : missing value
property tabViewItem3 : missing value
on myButton_(sender)
myTabView's selectTabViewItem_(tabViewItem2)
end myButton_
on applicationWillFinishLaunching_(aNotification)
-- Insert code here to initialize your application before any files are opened
end applicationWillFinishLaunching_
on applicationShouldTerminate_(sender)
-- Insert code here to do any housekeeping before your application quits
return current application's NSTerminateNow
end applicationShouldTerminate_
end script
Other methods seem to work such as the selectLastTabViewItem etc but not by the specific tab view item.
Any help would be greatly appreciated!
Matt