How to install ‘make’ and GCC on a Mac

Update for newer versions: The command line versions can now be installed straight from the command line itself; Open “Terminal” (it is located in Applications/Utilities) In the terminal window, run the command xcode-select –install In the windows that pops up, click Install, and agree to the Terms of Service. Once the installation is complete, the … Read more

Rails and OS X: How to install rmagick?

rmagick has a problem working with imagemagick (>= 6.8.0-10) from homebrew. You can either update rmagick gem by bundle update rmagick or manually symbol link some dylib to make it work: $ cd “`Magick-config –prefix`lib” $ ln -s libMagick++-Q16.7.dylib libMagick++.dylib $ ln -s libMagickCore-Q16.7.dylib libMagickCore.dylib $ ln -s libMagickWand-Q16.7.dylib libMagickWand.dylib After that gem install rmagick … Read more

Change selection color on view-based NSTableView

Since you’re using the view based NSTableView, you can subclass NSTableRowView, feed it to the table delegate method – (NSTableRowView *)tableView:(NSTableView *)tableView rowViewForRow:(NSInteger)row;, then customize your selection in the row view class. Here’s an example: – (void)drawSelectionInRect:(NSRect)dirtyRect { if (self.selectionHighlightStyle != NSTableViewSelectionHighlightStyleNone) { NSRect selectionRect = NSInsetRect(self.bounds, 2.5, 2.5); [[NSColor colorWithCalibratedWhite:.65 alpha:1.0] setStroke]; [[NSColor colorWithCalibratedWhite:.82 … Read more

Lightweight migration of a NSPersistentDocument

The compiled .momd resources can be loaded after an “existingPartner” fetch request is changed from: name == $name to: name == $NAME It’s counterintuitive that a part of the object model that does not affect the persistence of data breaks versioning and lightweight migration. It’s clear from the documentation that this should not be the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)