Archive for the “Programming” Category
Last night I updated Notification Watcher to be a Universal binary. I also updated the project for Xcode 2.2. You can find it over at tildesoft.com.
On a side note, I really need to re-design tildesoft to actually look semi-decent. I’ve been meaning to do this for ages, but I am not a designer. Anybody have any ideas?
No Comments »
Posted by: Kevin Ballard in Cocoa, Programming, tags: AppleEvents, dashboard, DVDPlayer, iLife, iPhoto, iTunes, iWork, Keynote, OS X, QuickTime, rcd, Remote Control
I just stumbled across something interesting today while poking around rcd (the daemon that farms out remote control events). If you send the NSDistributedNotificationCenter notification name @"com.apple.dashboard.dismiss" (no object or userInfo dictionary) then Dashboard hides itself. That’s pretty neat!
On a side note, it turns out there is no way to hack rcd to farm remote control events out to non-Apple programs. It has all the appleevents and such that it uses hardcoded in. I was really hoping they did something like implement a generic remote control AE that they sent to any app that cared, but no, if you’re not iTunes, DVDPlayer, iPhoto, QuickTime Player, or Keynote, you won’t see hide nor hair of the events.
Update: Turns out there’s a companion @"com.apple.dashboard.awake" notification as well that, you guessed it, brings Dashboard forward.
No Comments »
Just a quick post about AJAX on Rails, to test out my latest feature, which is Lightbox support for Typo:
If you click that and it doesn’t overlay the image on top of the current page, then you’ve run into a bug in Safari that I’m trying to figure out the cause of. Grrrrr.
The bug has been worked around.
No Comments »
Inspired by a script mentioned on ranchero.com, I wrote a ruby script that generates an RSS feed for all the Crash Reporter logs on your machine. Just create a New Special Subscription in NetNewsWire, point it at the script, and you’re all set.
10 Comments »
Well, yesterday was my first day at my new job. For those of you who don’t know, I’m now working at Yahoo! as a Macintosh programmer. Interestingly, my coworker (co-Macintosh programmer) is a FOAF that I met at WWDC (our mutual friend is Karl Adam, a.k.a. PantherMachina).
Anyway, I flew out here 2 days ago and am staying (for the short-term) with my older brother Rick, who works at Apple. I’m looking into getting an apartment with my coworker (his name is Tristan), but we need to find something appropriate first. In any case, the work here looks to be quite interesting and enjoyable - last night Tristan and I stayed until, I believe, 9:30 PM. Granted, I was just customizing my computer to have all the things I want/need on it, but he was actually doing some work.
For those of you who use the Yahoo! Instant Messenger network, you’ll be happy to learn that the project I’m working on is the Yahoo! Instant Messenger client. However, I think that’s all I can tell you, so don’t bother asking for details.
No Comments »
Seth Dillingham: “Never spend an hour doing by hand what you can spend four hours automating.”
How true.
via inessential.com.
No Comments »
So why has been talking about MouseHole lately. If you’re unaware, MouseHole is a ruby script that acts as a web proxy and filters HTML documents via ruby scripts. Or for a much better look at it, go look at what why wrote.
Anyway, I wanted a way to do JavaScript cross-site AJAX tricks, like what Greasemonkey enables. Unfortunately, because MouseHole is a pre-processor, not a JavaScript extension, it’s not possible. So I spent a few hours and wrote a way for MouseHole scripts to provide content that doesn’t actually exist (as opposed to mutating existing content). This way JavaScript can do an AJAX call within the same domain (so it doesn’t hit the security limitations) but that call is intercepted by your script, so you could pull info from other sites and send it back, or whatever you wish.
I haven’t actually done anything with this new capability yet aside from a rather silly example script which simply adds a button to Google that asks MouseHole for a random number. I’d really like to extend Google Maps, but that will require delving into how it works, and it’s far too late to do that now, as I need to get to bed.
Anyhow, I put together a patch and sent it to the MouseHole Scripters mailing list. If you check out MouseHole from the CVS repository, you can apply my patch and test it. Or you can just wait to see if it gets added to MouseHole.
No Comments »
So, for a while now Colloquy has had 2 nice new things going for it:
- The ability to write plugins in F-Script
- An installation of Trac on the website
F-Script
F-Script is pretty neat. It’s a Smalltalk-based language that lets you use the Cocoa frameworks to do some pretty nifty stuff. One of the best things about it is it lets me write Colloquy plugins that use the Cocoa frameworks without having to compile anything or relaunch Colloquy each time I want to test a new iteration of the plugin. It also lets me open up an F-Script console in Colloquy and play with it interactively.
(more…)
No Comments »
Ok, I just released SafariSource v1.5. This version adds a preference pane to Safari’s preferences that lets you control the syntax highlighting. It also adds the option to use italic/underline/bold in addition to colors and the ability to change the base font/size.
This update was a real pain to do. I ran into a memory corruption bug that I spent hours trying to track down. A couple hours ago I finally discovered the cause. I was using a header file class-dumped from Jaguar’s AppKit and apparently Panther added 2 new ivars to NSPreferencesModule. What I didn’t expect was that my definition of NSPreferencesModule was taking precedence over AppKit’s definition, so when I allocated the memory for my subclass it wasn’t large enough and whenever those 2 extra ivars were written to it was writing to memory that wasn’t owned by my instance and that was the memory corruption. Simply class-dumping a new header file and using that magically solved the problem.
Anyway, enjoy :)
No Comments »
I always thought that Safari’s source view was pretty dull and uninteresting and that they could have done better with it. Well, last night I finally decided to do something about it. After spending a couple hours looking over the disassembly of parts of Safari (to figure out where best to patch it) and then spending many more hours actually writing an HTML syntax colorizer I have a working SIMBL plugin that adds syntax coloring to Safari’s source view. I think it works quite well, although I admit I should add a preference pane to control the colors (it’s harder than you’d think to add a preference pane to Safari, which is why I don’t have it done for this release). If you want to download SafariSource (my plugin), you can get it here.
If you don’t like the existing colors you can always change them with a few terminal commands. Simply go in the terminal and use the following commands:
defaults write com.apple.Safari SafariSourceTagColor -array red green blue
defaults write com.apple.Safari SafariSourceAttributeColor -array red green blue
defaults write com.apple.Safari SafariSourceStringColor -array red green blue
defaults write com.apple.Safari SafariSourceEntityColor -array red green blue
defaults write com.apple.Safari SafariSourceIgnoreColor -array red green blue
defaults write com.apple.Safari SafariSourceDocTypeColor -array red green blue
defaults write com.apple.Safari SafariSourceProcessingInstructionColor -array red green blue
Most of those should be obvious what they affect. The SafariSourceIgnoreColor one affects the color used for the contents of <style> and <source> tags.
Anyway, if you have any feedback on SafariSource, feel free to send it to me.
No Comments »
|