Re: Resizing the unresizable
Re: Resizing the unresizable
- Subject: Re: Resizing the unresizable
- From: Ricky Sharp <email@hidden>
- Date: Tue, 25 Jul 2006 18:47:57 -0500
On Jul 25, 2006, at 4:50 PM, Tom Harrington wrote:
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.
Not sure why you're seeing it as being writable. I just tried again
and ensured that Acc Inspector showed a hierarchy of:
<AXApplication: "System Preferences">
<AXWindow: "System Preferences">
Of all the attributes, only the following are writable:
AXMain
AXMinimized
AXPosition
This is Mac OS X 10.4.7 (PowerPC) using Accessibility Inspector 1.0
provided with Xcode 2.3.
Could you perhaps have any haxies installed that would account for
the strange behavior?
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.]
Agreed. Although in my own app (Cocoa which uses a borderless
window; it's a full-screen app) it too doesn't report the size
attribute as being writable.
Hope you find out what's causing this on your system,
___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.com
_______________________________________________
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