Re: Xcode splitter get size/set size
Re: Xcode splitter get size/set size
- Subject: Re: Xcode splitter get size/set size
- From: Bill Cheeseman <email@hidden>
- Date: Sun, 14 Mar 2010 08:31:27 -0400
On Mar 11, 2010, at 3:54 PM, Bill Hernandez wrote:
> I am trying to resize the Xcode "groups & files" view, and thought that if I set the (splitter group 1) to the width I want that should work.
>
> I tried to set the left pane of an Xcode project to be 250 pixels wide. I observed the variables as I traced through using ScriptDebugger, and everything worked fine, except the pane did not resize.
> Open this Scriplet in your Editor:
>
> set desired_width to 250
> activate application "Xcode"
> tell application "System Events"
> tell process "Xcode"
> -- get the {w, h} of the "groups & files" view
> set {groups_w, groups_h} to size of (splitter group 1) of group 1 of window 1
>
> -- don't change the height, only the width
> set (size of splitter group 1 of group 1 of window 1) to {desired_width, groups_h}
> end tell
> end tell
> It appears to me that Xcode supports the get, but not the set {read only} for (splitter group 1)...
>
> Any idea what I am missing ?
In PreFab UI Browser, the 'size' attribute of the splitter group is not marked as settable. Therefore, it is read-only -- you can get its size, but you can't set it.
Try the Finder for comparison. In a standard Finder window, the splitter group is also read-only. However, it has a child, a 'splitter' UI element, and you can set the splitter's 'value' attribute to change the width of the left pane. Xcode's splitter groups do not have a 'splitter' child UI element, so that won't work in Xcode. Your only recourse is to file a bug or feature request with Apple.
--
Bill Cheeseman
email@hidden
_______________________________________________
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