Skip navigation.
 
mlApplescript Question
FROM : J. Todd Slack
DATE : Tue Jun 24 19:14:49 2008

Hi All,

I have an Applescript question.

How, from Applescript, can I load a nib, and open a particular window 
and have it bring up the right tab control on the fork?

I have a window with tabs and depending upon menu option selected, I 
want the right tab shown.

Here is what I have so far:

on choose menu item
   tell me to activate
   
   load nib "MainMenu"
   
   set aboutWindow to window "RMWindow"
   
   set visible of aboutWindow to true
   
end choose menu item

This code works and I get the window open, but not the correct tab 
displayed.

If I change to:

on choose menu item
   tell me to activate
   
   load nib "MainMenu"
   
   set aboutWindow to window "RMWindow" of tab view item "RMTabAbout" of 
tab view "RMTabView"
   
   set visible of aboutWindow to true
   
end choose menu item

I thought this would work, but I get an AppleScript error of: Can’t 
get «class tabV» "RMTabView". (-1728)

I am not sure why this is, my tab view object's AppleScript ID is: 
RMTabView

The tab is named: RMTabAbout and has an index of 4

I am lost, not sure what I am doing wrong. Can anyone explain so I can 
learn?

Thanks,

-Jason

Related mailsAuthorDate
mlApplescript Question J. Todd Slack Jun 24, 19:14
mlRe: Applescript Question SD Jun 24, 19:28
mlRe: Applescript Question J. Todd Slack Jun 24, 19:34
mlRe: Applescript Question SD Jun 24, 19:44
mlRe: Applescript Question SD Jun 24, 19:48
mlRe: Applescript Question J. Todd Slack Jun 24, 19:57
mlRe: Applescript Question -- SOLVED J. Todd Slack Jun 24, 23:28