Re: Unable to set accessibility hint for NSTextField
Re: Unable to set accessibility hint for NSTextField
- Subject: Re: Unable to set accessibility hint for NSTextField
- From: Alex Hall <email@hidden>
- Date: Mon, 07 Sep 2015 14:32:44 -0400
Okay, I found half the problem. The property is accessibilityHelp, not accessibilityHint. That's what I get for trusting ctrl-cmd-j.
The problem now is that I can't change it. Xcode sees it as a valid property, but tells me that 'self' is immutable. The definition in the header says that accessibilityHelp is nullable, so I wondered if Swift was making it an optional, but it's not. It also looks like accessibilityHelp is as of OS X 10.10, which might explain how I missed it.
> On Sep 7, 2015, at 14:23, Alex Hall <email@hidden> wrote:
>
> I tried that as well, but got the exact same error. Swift likes to use assignment, rather than setters, it seems, but I thought a setter might do the job. Sadly, neither way seems to work.
>> On Sep 7, 2015, at 14:20, Marco Zehe <email@hidden> wrote:
>>
>> Hi Alex!
>>
>> Can't you just use the setter? SetAccessibilityHint?
>>
>> Marco
>>
>>
>>
>>> Am 07.09.2015 um 19:30 schrieb Alex Hall <email@hidden>:
>>>
>>> Hello all,
>>> I'm trying to change the hint of a text field in code, because it will differ during runtime from what I set in IB. I'm doing this:
>>>
>>> myTextField.accessibilityHint="new hint text"
>>>
>>> I'm getting an error, though, that "value of type NSTextField has no member accessibilityHint". Yet, cmd-ctrl-j on the word "accessibilityHint" jumps right to it, but in UIAccessibility.h, which makes no sense at all. How do I update the hint, label, or other accessibility attributes for standard controls on OS X? Thank you in advance.
>>>
>>> --
>>> Have a great day,
>>> Alex Hall
>>> email@hidden
>>>
>>>
>>> _______________________________________________
>>> 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
>
>
> --
> Have a great day,
> Alex Hall
> email@hidden
>
--
Have a great day,
Alex Hall
email@hidden
_______________________________________________
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