« January 2006 | Main | April 2006 »

February 26, 2006

xCode and pyObjc "build and run"

For those of us who live with pyobjc's xcode templates, there is an annoying little bug when creating a new project, at least on my machines. There are no executables created when you make a new python/cocoa project of any kind which causes xCode to disable "build and run" button. Sure, we can build in Xcode, navigate to the build directory, and run the application, but that's what the "build and run" button is for! How do we fix this? Add the project executable to the Executables group in xcode!

Like this:

In your xCode session, there is a pane down the left side that shows the contents of the project. In that pane, ctrl-click the "Executables" group, select "Add," then "New Custom Executable". Put the name of your application appended by .app in the "Executable Name field." (i.e. if your app is called "Trigger," put "Trigger.app" in this field). Use the "choose" button to navigate to your application's build directory on your hard disk and choose your application bundle. (If it doesn't exist, try building your application with the build button once first.) Now in the "Project" menu of xCode, "Set Active Executable" to your application name. This should enable the "build and run" button.

UPDATE: Once you've done that ^, you can then change the path to the executable to $BUILT_PRODUCTS_DIR/YourApplicationNameHere.app so that your project doesn't have any hard-coded paths.

Cocoa Bindings 2: not too frustrating, really

If you thought it was cool to drag connections between GUI widgets and actions in a controller object when you first started using Cocoa, you’ll flip when you see this in action. Bindings really are just what they say they are: tell Interface Builder to connect this GUI widget to this part of the data model and, presto-chango, no significant glue code.

I have a little PyObjC application that is coming along quickly thanks to cocoa bindings. My first PyObjC app took me weeks to figure out (partly due to the lack of cocoa object knowledge) and is several hundred lines of code. This app was started a few days ago, is considerably more complex, is nearly finished, and is barely any code.

Info regarding dead-ends I hit and how I’ve gotten this to work for me will be posted here soon. I may post a pseudo-wiki sort of thing that clarifies some of the things I found confusing while trying to use this in a real application. For now, here are links to the tutorials I’ve found most helpful:


This one is dirt simple, but clarifies a lot of the voodoo involved:
http://bob.pythonmac.org/archives/2004/04/04/pyobjc-nstableview-cocoa-bindings-tutorial/


This one is down right now, but was up yesterday. I assume they’re having temporary problems. This is a bummer as this tutorial shows one how to get and set values directly in the data model without a controller object.

http://www.wilcoxd.com/blog/archives/000075.html

February 23, 2006

Cocoa Bindings 1: the resolution

OK. It's a little late for a resolution for the New Year.

I am finally going to learn cocoa bindings. I have the right app for it. I've a couple of books with info. I've got tutorials all over my dev documentation folder.

Come along. I'll chronicle the ride here.

It's going to happen. I can feel it. This time, PyObjC. Next time, objc

jonathansaggau.com/trigger.jpg

February 22, 2006

Cell Phone Design

My cell phone has a speakerphone feature to allow me the use of the device “hands free.” This, while potentially annoying in public (like that stupid walkie-talkie feature pioneered by Nextel and co.), proves quite useful while on hold with one's ISP, for example, or for taking tech support calls from clients...typing and talking. On many a cell phone, the speaker used for this feature is found on the back of the phone, which gets covered when you put it down on most any surface thereby severely muffling sound and rendering this feature useless. Conversely, the microphone used is the same used during normal operation located on the front of the phone; this means you can't cheat bad design by flipping it upside-down because the microphone then becomes unusable for the same reason the speaker doesn't work so well in the scenario above.

Good Design Decision for today:

My cell phone (LG VX4500) has a little raised nub near the speaker. This serves to allow the speaker more-or-less free access to a sliver of nearby air and to eventually excite my oversensitive eardrums. It's loud and surprisingly very clear; partially (I think) because the surface upon which it rests is usually hard enough to reflect sound fairly well. I notice also that the speaker enclosure appears deeply concave. The only reason that I can ponder for this (besides "it looks cooler") is to allow for diffusion of reflected sound from a hard surface. This may very well represent another conscious design decision.

Life is Good. And these LG Engineers are making mine just a little better.

February 09, 2006

Laptop Jam and Performance This Sunday!

Do you:

Hang out with nerds?
Make sound with something you have to plug into a wall?
Like bars that have LCD screens embedded in the furniture?

Then come out to Bar Mundial on Sunday at 9 PM to experience the
premiere performance of Jonathan and Amelia's Robot Laptop Band!

We'll be performing a featured set at SHARE (http://share.dj), which is a weekly
audio/visual laptop jam in the East Village. We'll be showing off the
bugs in our current "work in progress," and making troublesome noise
and visuals to open the evening's jam session this Sunday, February
12, 2004.

You'll be sure to find us drinking and joining the jam session after
the set. If you make noise or video, bring your axe and plug in. A
projector, a mixer, and amplification are provided; BYOC (Bring your
own cable). It's really fun and informal and nobody minds if your
computer crashes, if your Max patch explodes, or if your delay pedal
goes haywire. In fact, most of us like it when that happens.

No cover!

About us:

We're a couple of self-professed computer nerds / artists who make
noise and images with computers. Using technologies like OpenGL,
superCollider, C++, Python, Open Sound Control and The Macallan Single
Malt Highland Scotch Whisky, we create interactive real-time audio /
visual performances.

Details:

Sunday, February 12, 2004
9 PM

Mundial
505 E 12th St
between Ave A and B

free

Spread the word.