blog advertising is good for you


blog advertising is good for you
User login

Tips and tricks for desktop and web developers using Mac OS X.

There’s nothing worse than an application that hides its data … no, your data from you. As a developer, you should take into account your experience as a user and avoid lock-in as much as possible, as well as enable useful “mashups” with other applications. To make it easier for users to use both your application and another with the same set of their data, you need to make it easy for users to get that data out of your application. You could support every common export type for your kind of data and hope that’s enough, or you could create a simple API to get at the data so that your users can do the work of making those exports. On the Mac, the easiest and most standard way of doing the latter is AppleScript.

With AppleScript you can setup a basic description of where you keep your data and let Cocoa Scripting take over and pull it all out of your program for you without you needing to change much at all. You’ll get features like searching and basic property editing for free. It’s quick, easy, and wonderful.

Unless you’re using Core Data. Like many other features in Mac OS X, gaining all the benefits of Core Data exempts you from the “easy” part that comes with the rest of the OS (like, oh, threading and autosave-enabled NSDocuments, for instance). It doesn’t make it impossible, it just makes it a very slight more interesting. In fact, making a read-only AppleScript interface is rather simple. Making a read/write interface is a minor pain in the posterior. Today, I’ll go over how to make a read-only interface and touch on the difficulties of making a read/write interface with Core Data. Later, I plan on covering the read/write interface when I’ve solved the ills of doing so and can explain how I got it to work. So much of this is “hold the bunny ears halfway up and lift your right leg towards the south” that it’s sometimes hard to say how something is working, or not. There's more »

I was having quite the problem with trying to install programs from the command line: Bash would complain I didn’t have libraries installed that I most certainly did, and pkg-config was no help, since it apparently wouldn’t talk to X11 or Bash at all. Nice. Those are hours of my life I’ll never get back. There's more »

I love the dock but hate when I accidentally click on an app that I didn’t mean to click on. Is it possible to either change the single click to a double-click to open an app on the dock or change it for certain apps so that you are prompted “Do you REALLY want to open that?”

Thanks,

Josh

Read the answer...

I’m trying to automate Mac icon creation for folders and files headlessly via the commandline or AppleScript.

I’m dynamically creating alpha masked PNG’s and wish to transfer those to Folder/File icons with no user intervention, all in the background.

Also for the sake of when Leopard comes out, it would be great to have 512×512 icon support. Though ANY support would be welcomed.

While I’d like to be using some Apple standard system for correctly applying icons, Folder icons are open to some hackery as they store the icon inside the folder itself as an ‘Icon’ file in the format of .icns, however I know of no way to automatically generate an icns file, and even if I could, you cant just rename your file to ‘Icon’ as the name is in fact ‘Icon^M’ or rather ‘Icon’ folowed by a carriage return, which is impossible to do as far as I know.

Any help in this endevour would be greatly appreciated.

Read the answer...

No free for OSX

I was trying some software on my osX…. when it suddenly crash.. i say WoW(not as in World of Warcraft™ stunned) what happened?.. we try to find out what went wrong… then we finally notice that there is no free(Unix command, that display information about free and used memory on the system) on osX… sad sad…

Well ill try to find out how to address this issue and ill let everyone else know… if someone out there knows a way to get free working on osX let me know, i tried to install it via fink but there was no package for it…..

Later,
—DR

As a way to more easily play movies from ripped DVDs, I have started setting the “Movie” folder (the folder which contains the VIDEO_TS and AUDIO_TS folders which generally is the name of the movie) as a “Bundle Bit” via the Path Finder Get Info pane (I would imagine that it works the same in the Finder as well), giving the folder an extension of “.dvdmovie” (the extension could be just about anything so long as there are no conflicts with existing extensions), and informing the system that I would like all files with said extension to open via VLC so that all I need to do is double click the new bundle bit and watch the movie. This works extremely well (I really prefer not to use DVD Player as it doesn’t always play ripped movies correctly), but I have one problem. All of my new “.dvdmovie” bundles have the generic “Document” icon which is unsightly.

How do I make the system (via GUI, Applescript, command line, or hacking) apply a specific icon to all of my new “.dvdmovie” bundles, and to future ones as they are made? I would think that there is a way short of manually assigning them individually.

Read the answer...

Folder Quotas

I have a geeky question for you.

I work in a place with a fairly large Macintosh install (270 + / -). In supporting my users, we have historically not locked them out of iTunes, iPhoto, etc. Most users do not abuse this privilege. There are, however, some that do.

One avenue that I would like to offer management is restricting the amount of space available to the users in the folders (movies, music and pictures). It would all be more manageable if the users had, say, 1 gig per folder. That way the users would still have access to the programs, but not fill their drives with music and pictures. If this was a straight Unix format, I know how I would do it. But this is HFS+, so I am not sure of the best path the achieve the desired outcome. I have some ideas of my own, but I wanted to see what wonderful, MacGeekery solution(s) you can offer.

Thank you for your help.

Read the answer...

Why Are You Not at WWDC?

I’m a relatively new-to-the-mac programmer, interested in exploring the capabilities of Objective-C and Cocoa, among other things.

What I’m running into, however, is a dearth of good resources targeted at experienced programmers who just don’t know their way around the Apple world. Is there anything like that out there? If so, where?

Also: I’d love to find some of the nicer interface components I see here and there in OSX applications, like the drag+drop wells that CandyBar uses. Is there a good clearinghouse for Cocoa interface components and libraries anywhere?

Read the answer...

At WWWDC

We’re at WWDC this week, so we’ll liklely be a little slow to answer questions, if at all.

However, we (and others) are reading the mg-support mailing list, so if you have technical support questions, post them there. Tips still get posted here.

We’ll probably write about the results of the conference keynote on codepoetry and ungenius so stay tuned to our personal blogs for that kind of stuff.

Oh, and while I’m plugging, try out Switchblade, the first application from Barton Springs Software. It’s a really neat application switcher that learns which programs you use more often and makes them more available over time. There's more »

Calling Packaged Tools

I am a fledgling mac programmer, and I cannot find a bit of useful documentation on how to call ‘packaged’ shell programs. For example, if you use the wonderful program iSquint and do a ‘show contents’ on the app, you’ll find unix shell apps like ‘ffmpeg’ and ‘qt_export’ in the Resources directory – how the heck can I 1) package apps like that in an Xcode project (cocoa), and 2) how do I ‘call’ it from my program?

Read the answer...