Accessibility broken with Preview.app in OS X 10.8.4? - macos

We have an application that integrates with different programs (among which is the Preview.app) using accessibility. We use the AXUIElementSetAttributeValue function to programmatically select some text in a PDF document using the kAXSelectedTextRangeAttribute. This used to work fine but suddenly stopped on my Mac (nothing seems to happend). My co-worker doesn't have the issue so after trying to figure out the difference I remembered that I had just updated to OS X 10.8.4 while he hasn't. I then read about this update and among the features and fixes was the following:
Improves VoiceOver compatibility with text in PDF documents
This indicates to me that they have fiddled with the area where I am having the issue. My question is now weather this is simply a bug or if it is by design. In the case of the latter, what am I supposed to use in stead?
PS. We tried also setting the selection range using the Accessibility Inspector found under Developer tools in Xcode and it works fine in 10.8.2 but not in 10.8.4, which further indicates that this might be a bug.

This is indeed a bug. I just installed the developer preview of OS X 10.8.5 and the issue has been resolved here. In the change-log it also says that some of the changes in this version regard "PDF viewing and Accessibility".

Related

Getting the default document editor toolbar in Mac Catalyst

I’ve just started porting my iPad app to the Mac using Catalyst. It’s a document editor and uses UIDocument. I’m trying to get the default toolbar behaviour for a document editor on macOS where there’s a dropdown to quickly name, tag, and move the document, and a subtitle that shows if the document has been edited. I can’t see any way to do this with Catalyst — is it possible?
Thanks,
Luke
A representative from Apple confirmed to me that this is not possible using Catalyst. In my opinion this makes Catalyst unsuitable for document based apps at the moment (Big Sur is currently the latest version of macOS).

Mac OS Siera PyQt5 QTabWidget Issue

I usually program on windows (at work) or linux (free time).
Now im doing a project for my wife, and she uses a mac.
In this project there is a QTabWidget with closeable tabs.
On windows the close icon appears properly, and as excepted, however on MAC there is no close icon.
When you click far left on the tab title it just closes unexpectedly, because you cant see a close icon, and im not 100% sure why that is.
Anyone seen this before and know of a fix?
Mac is latest Siera os (just updated)
Python 3
PyQt5 (installed with pip3)
Thanks very much in advance
This is caused by a bug which has been fixed in Qt-5.9.2 (see QTBUG-61092).
In the meantime, it should be possible to work around the issue by setting your own icon using a stylesheet. To do this, you would need to use the QTabBar::close-button selector, which is documented in the Qt Style Sheets Reference.

Distance lines are not showing in interface editor

after installing latest Mac OS X (El Capitan) I found that distance lines inside Xcode interface editor does not appear anymore after pressing alt key. I do not know if system update has something to do with it ... maybe I just pressed some kind of key configuration which disabled distance guides. Did someone ever had similar situation? Below I attached link to image which exactly shows lines I am talking about.
https://www.dropbox.com/s/qoy8wvvddxxaupy/2015-10-06_1341.png?dl=0
Ok so It turned out that the problem was in having two Xcode versions installed on one machine. I mean that currently I have Xcode 6.4 and 7.1 on my mac and version 6.4 behaves sometimes quite strange (for example I am not able to add new source file directly to project because I am not able to choose any group option). 7.1 is ok. So if you have some problems in similar configuration then get rid of Xcode 6.

Interface Builder appears blurry on retina display in Xcode 6.3

I just recently downloaded the latest public release of Xcode (6.3) and I noticed the storyboard for my app is now low res on my Retina MacBook Pro. Images, text and standard UI elements all appear blurry. On the actual device everything looks fine and code still looks sharp its just while working in the Interface Builder.
Has anybody else noticed this and figured out a way to fix it? This is happening to me in both Swift and Objective-C projects including in Apple's sample projects (Master-Detail Application and etc).
I submitted this as a bug report, and Apple responded by saying that it is the desired appearance. They did not give an explanation, that was all they said.
It appears to be related to a bug in the newest iOS SDK, and as a workaround, they've forced Interface Builder to render everything at 1x. Currently, there doesn't seem to be any solution to this annoying problem other than to wait.
Just installed Xcode version 6.3.2 and this issue appears to have been fixed.
Have you tried re-installation of the same version? That helped once.
Alternatively, can upgrade to newer version, too.

How to simulate a retina display (HiDPI mode) in Mac OS X 10.8 Mountain Lion on a non-retina display?

How can you simulate a retina display (HiDPI mode) in Mac OS X 10.8 Mountain Lion on a non-retina display?
Search for, download, and install Apple's free Additional Tools for Xcode 8 (for previous Xcode releases search for Graphics Tools for Xcode according to your version).
Note: free Apple Developer account required.
Launch Quartz Debug application.
Go to menu: Window ---> UI Resolution.
Check Enable HiDPI display modes.
Quit Quartz Debug.
Open System Preferences.
Select Displays icon.
If using multiple display, select the configuration window on the display you wish to simulate HiDPI mode on.
Under Resolution:, select Scaled radio button.
Find a desired resolution postfixed with (HiDPI) and select it.
Your display is now running in HiDPI mode, simulating a retina display.
Source: High Resolution Guidelines for OS X
I found the following instructions. It seems to work, and it is much easier than the Quartz Debug approach.
"Enable HiDPI mode in Mountain Lion w/o Quartz Debug"
https://gist.github.com/3191869
In brief, run the following commands, log out, log on, and the HiDPI resolutions are available in the display preferences:
sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool YES
sudo defaults delete /Library/Preferences/com.apple.windowserver DisplayResolutionDisabled
(In my case the first command was enough; the second command just prints an error message.)
Edit: (5/31/2016)
For users trying to do this on El Capitan, please read the FAQ on SwitchRes's website. Also, if something's still not working after you did all the steps in the FAQ, consider uninstalling and reinstalling SwitchResX. That solved the issue I was having on one of my laptops.
Original:
After reading through several forums, websites, blogs.
I am here to present a solution for users with 15" MacBook Pro with Retina display connected to a Thunderbolt Display.
First of all,
Terminal command of modifying plist
Quartz Debug
Holding option and select "Scaled" in System Preferences
ResolutionTab (Mac App Store)
These methods DO NOT work for MBPr with Thunderbolt Display, for whatever reasons.
You will not see the HiDPI options to be selected.
The only tool I found that actually gives us the options is SwitchResX.
However another problem exists here.
Most users with this setup, I believe, are trying to use 1280x720 HiDPI because it's half the native resolution of the TBD.
According SwitchResX's FAQ, in some cases it is not possible to set to this resolution because of a bug within OS X itself.
Here's a screenshot for your reference:
After contacting the developer, he presented a workaround - adding one more pixel - which worked for me.
Install SwitchResX and open it from System Preferences.
Go to Thunderbolt Display tab, and add a Custom Resolutions with Scaled Resolution at 2562 x 1440
Here's a screenshot
Save using command + s. (or simply close the window and use the prompt up)
Restart the laptop.
Go to SwitchResX and select the new custom resolution in the Current Resolution tab. (Sometimes it doesn't show up right away, play around with it and it should.)
Here you go.
I hope this answer gets to users with this setup because it is really frustrating to use 16:10 resolution on a 16:9 display.
For those unable to enable HIDPI on rMBP or new MBA, I experienced the same on my rMBP 15" with Air Display. I solved the problem by installing SwitchResX. With the boolean setting enabled as shown in the referenced gist, the HIDPI setting shows up.
Dragging seems a little laggy in Air Display, but otherwise works great.
Try this
sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool YES
[from here]
If your monitor supports it, it may also be worth setting the DisplayPort version to 1.1 instead of 1.2.
I have a late 2010 Mac Air with a Samsung S27D850 display and had all sorts of intermittent resolution switching issues until I made that change.
As for me its pretty good app that give you opportunity for changing resolution any that you want.
SwitchResX for Mac and MacBook.
This app resolved all my problems with resolution.

Resources