Objective-C and libsigc++
I’ve started working on a secret MacOSX project. I decided to use Apple’s Cocoa framework, so that means I have to use Objective-C. The backend I’m basing my project on is in C++ and uses the libsigc++ callback library as an important component of its interface with the frontend. So how do you setup ObjC methods to be called back?
Use my glue header. It will create glue functions at compile time for calling objc_msgSend() with the appropriate arguments.
Example:
SignalActivated.connect (sigc::bind(sigc::ptr_fun(objcsigcglue
This will call [self CatchSignal:boolValue]. Pretty neat, right? For the majority of callbacks that don’t accept arguments, a mere function pointer cast is needed:
BoringSignal.connect (sigc::bind(sigc::ptr_fun((msgFtn)objc_msgSend), self, @selector(boringSignalCatch:)));
Update: I fixed objcsigcglue.h to work with references that are passed to the callback. It should be much more flexible with other types I haven’t anticipated too.
first banjo demo
I’ve recorded my first banjo song. Happy Banjo.
The Mother of All Dubbers
From Harrison’s marketing materials:
The recording software behind the X-Dubber is an open-source, highly scalable program called Ardour. The stable, full-featured Ardour workstation has the capabilities you would expect from a state of theart workstation. By focusing on the specific needs of thepost-production community, Harrison has packaged the Ardour workstationinto a robust, streamlined re-recording product that meets the needs ofour world-class customers.
Pretty awesome. Go Team Ardour.
Nuclear glow over LA
This is a photo from the 1940s of the glow of an above ground nuclear bomb test as seen from Los Angeles. Apparently, it lit up the horizon as bright as day. Found on boingboing.
broken
I’ve switched my blogging software from Drupal back to Wordpress. This is because I kept falling behind with Drupal’s bug and security fixes and just couldn’t keep up. Wordpress is better for blogging anyways. I still love Drupal, but it’s really geared at community sites.
I’m just warning that links will probably be broken for a little while. On the other hand, I hope to unveil my new creepysmiles site soon.
Blogging from TextMate
This is being posted from the wonderful TextMate text editor. It’s like emacs, only without the lisp and MacOSX native. It’s very popular in the Ruby on Rails community. I even registered for it. I have a fairly short list of shareware I’ve deemed important enough to buy.
Beatles Critic
“Hi, I’m an asshole music critic.”
What sort of person writes an essay like that? What must it be like to live knowing that you’re that sort of person, everyday?
mottos are emo
Naama says it’s emo, but I don’t care. It’s my motto and I’m sticking to it.
Now available for purchase.
musical taste signature
My musical taste signature, courtesy of the iTunes Signature Maker.
Flock
I’m posting this from the new Flock browser. It seems pretty cool. I’m not the biggest flickr user, but I appreciate the intergrated del.icio.us bookmarks. Still trying to get into that. The fonts aren’t as nice as the ones in Safari, but it’s usable.
I appreciate the built in clipboard at the bottom where you can drag in images and text for later use. Pretty cool!
It’ll be nice if they add support for Gallery2 in addition to Flickr and Photobucket. I mean, what about those of us who host our own photos?
