Re: Re: Resizing the unresizable
Re: Re: Resizing the unresizable
- Subject: Re: Re: Resizing the unresizable
- From: "Tom Harrington" <email@hidden>
- Date: Tue, 25 Jul 2006 15:50:32 -0600
On 7/22/06, Ricky Sharp <email@hidden> wrote:
On Jul 22, 2006, at 2:42 PM, Tom Harrington wrote:
> On 7/22/06, Ricky Sharp <email@hidden> wrote:
>> As a workaround, I suppose you should be able to ask if the size
>> attribute is settable, and then only set it if it is.
>
> I worked around it by looking up the window's kAXGrowAreaAttribute,
> and assuming that if it's present, the window is supposed to be
> resizable. I haven't tried checking whether kAXSizeAttribute is
> settable, but it seems that it must be since I was in fact able to set
> it. So I'm not sure that would work, but I'll keep it in mind in case
> checking for the grow area turns out to not be reliable.
It would be better to query if the size attribute is settable. After
all, that's the attribute you are setting.
The size attribute of System Preferences (and other apps with non-
sizable windows) is not shown as being writable by Accessibility
Inspector.
Sure about that? Because when I try it, it shows me that it is
writable. That's if I have my mouse over just the window but not any
child elements-- so that the hierarchy displayed in Accessibility
Inspector is just AXApplication and AXWindow. If you've got the mouse
over some other UI element in System Prefs you may get a different
result, but it's window resizing that I'm interested in.
I tried this code in my app, and it always indicates that the size is
writable when the target window is System Preferences (this code is
preceded by code that finds the containing window of a UI element, and
saves a reference to it in currentTargetWindow):
Boolean sizeIsSettable;
copyValueError = AXUIElementIsAttributeSettable(currentTargetWindow,
kAXSizeAttribute, &sizeIsSettable);
if (sizeIsSettable == false) {
IFDEBUG(NSLog(@"size is not settable on target window"));
return;
} else {
IFDEBUG(NSLog(@"Size is settable, full speed ahead"));
}
I can see the logic of what you're saying, but unless I've missed
something the logical approach is broken in this case.
[Just to keep on track, I'm only using System Preferences as an
example of a window that should not be resizable, but the discussion
applies to any non-resizable window.]
--
Tom Harrington
email@hidden
AIM: atomicbird1
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Accessibility-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden