• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Scripting Bridge question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Scripting Bridge question


  • Subject: Scripting Bridge question
  • From: Sung-Jin Lim <email@hidden>
  • Date: Thu, 27 Jan 2011 06:22:32 +0000 (GMT)

Trying to get sidebar width of front most window,

FinderApplication *theFinder = [SBApplication applicationWithBundleIdentifier:@"com.apple.finder"];


SBElementArray *windows =  [theFinder windows]; // array of finder windows

NSArray *targetArray = [windows arrayByApplyingSelector:@selector(target)]; // array of targets of the windows

FinderWindow *win = [targetArray objectAtIndex:0];

NSLog(@"win name - %@", [win name]);


NSInteger width = [(FinderFinderWindow *)win sidebarWidth];

This throws exception


 -[FinderFolder sidebarWidth]: unrecognized selector sent to instance 0x1006aabc0


and somehow 'win' is considered as FinderFolder* not FinderWindow*?


What am I missing?

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Prev by Date: Anyone know how to trash finder window view settings?
  • Next by Date: Re: Anyone know how to trash finder window view settings?
  • Previous by thread: Re: Anyone know how to trash finder window view settings?
  • Next by thread: Database Events Problems
  • Index(es):
    • Date
    • Thread