Cocoa App Renders Differently on Macbook Pro vs Mac Mini - macos

Perhaps I'm going crazy here, but I have a desktop mac application which, in one of its windows, has an NSImageView placed in a specific spot (using Interface Builder).
When I run the app on a Mac Mini it appears in the right spot. But when I run it on a Macbook Pro the image view is offset quite noticeably.
I've tried on both Lion and Snow Leopard on two different macbook pros and two different mac minis. The OS version doesn't seem to be a factor. It seems the only difference is that one machine is a laptop and the other is a desktop, but I have no idea why this would affect the positioning of elements.
Is there any reason an app's UI elements would not appear in the right spot when running on a laptop vs desktop?
Or perhaps there's another reason this is happening?

If your display is smaller on the Mac Mini and the window is larger than the display then it could be automatically resized. If that is the case then you should look at the view's autoresize mask to make sure they are correct.

Related

Rotation reverting on Mac display settings

I have four Dell monitors connected to Mac Pro. Rotation reverts to Standard for other displays if I change one to 90 degrees in System Preferences -> Displays. This used to work before the forced update. I'm on MacOs Catalina 10.15.7.
It's hard to work on this machine with monitors disoriented. What are my options to get back to the corrected orientations as before?
In frustration, I rebooted my Mac Pro another time. And voila, the screen orientation is using the original correct ones so that all the vertical monitors are in alignment now.

JavaFX programs show only graphical nonsense under Java 8

I have installed Scene Builder 2.0 on my Mac. When started (whether as standalone program or from within e(fx)clipse) it shows only a graphical mess (a fragmented mixture of my desktop wallpaper and program windows which have been on the screen recently). The menu bar works, but if I e.g. open the "about Scene Builder" window this window also contains that graphical nonsense. In rare occasions, the start screen looks somehow as it should but all characters are messed up with strange characters and after moving the window I get the same graphical mess as always.
I tried running the JavaFX programs from the JavaFX 2.2 demo bundle and found the same problems. They also have worked before I installed Java 8.
Even JavaFX programs run frum within eclipse show the same behaviour.
I'm running Mac OS X 10.7.5 with all recent updates, Java 8 Update 25 and Scene Builder 2.0 on a 13" MacBook from 2008.
Previously, I had no problems with Scene Builder 1.x and Java 7 on this system (maybe I got OS updates in between).
I have tried reboots, reloaded Scene Builder from the website and reinstalled it, removed all old versions of Java. Nothing did work. The OS X software updater tells me everything is up to date.
Any Suggestions?
Anyone with similiar problems?

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.

Adobe AIR application GUI not working on Mac OS

We have an Adobe AIR app, which was created by a 3rd party contractor, that we have been using successfully on Windows. The application runs full screen automatically and, for the most part, primarily is chrome for displaying some web pages.
On windows, it works perfectly. Only now, 9 months after development, has someone asked to try to run it on a Mac. We figured it would work since AIR is cross platform. It installs just fine (latest AIR SDK on OSX Lion). When we run the app, it launches but only shows the name of the app next to the Apple symbol in the upper left. No window or other chrome appears on the screen. I can Quit the app from the menu, but not much else.
Any thoughts as to why it's behaving this way on the Mac and not Windows? We do not have access to the original developer, and I am not a Flash/Flex person, but I do have the source and a copy of Flash Builder 4, so I could make basic tweaks. Any pointers would be very appreciated.
Have you tried to call maximize() after creation complete? I had the same problem (main window not showing up on Mac OS, everything is fine on Windows). Hope this helps.

Testing jQTouch Swipe Events on Development machine

I'm currently developing a quicky mobile application using JQTouch - everything is going well but I've got a bit of a debugging issue.
At the moment I'm implementing all the core functionality, so using my development box (Windows, Using Safari to test it) I'd like to ensure that swipes are being handled correctly. However, short of booting up in Mac OS X or hosting it online and running it from my iPhone (may seem like no real trouble - but hey, we're all coders! We all know how comfortable our toolkits/environments are) - is there a way to test swipes "in browser"?
I thought I could simply click and drag to mimic a swipe but that just results in my dragging my image away...!
Thanks in advance
There is no easy way, that I know of, to test iPhone applications (Web app or not) on a non-Mac machine.
Your best bet is probably to run Mac OS X through a virtual machine, e.g. VMWare. Then install XCode, which has an iPhone Simulator. You can get XCode for free after you register yourself as an iPhone developer with Apple.
Leopard image for VMWare
Snow Leopard image for VMWare

Resources