Powered by Blogotomy Identity Password

tyler


Code: Apple's PyObjC Tutorial

Sat Dec 15th 00:29:48 2007 *

Being a Mac OS X, Python and Cocoa fan, I decided to combine all three and try out PyObjC in Leopard. It's all built in so I found a tutorial on Apple Developer Connection that goes through a very simple app. The problem is it is outdated. Interface Builder and even XCode are updated and the screens are different.

I followed the tutorial as well as I could and ended up with the following error:

2007-12-15 00:23:53.175 pyave2[21268:10b] Unknown class `Averager' in nib file, using `NSObject' instead.
2007-12-15 00:23:53.203 pyave2[21268:10b] Cocoa Bindings: Error accessing value for key path numbersInput of object (from bound object with object ID 375 in Nib named MainMenu.nib): [ valueForUndefinedKey:]: this class is not key value coding-compliant for the key numbersInput.
2007-12-15 00:23:53.204 pyave2[21268:10b] Cocoa Bindings: Error accessing value for key path calculatedMedian of object (from bound object with object ID 383 in Nib named MainMenu.nib): [ valueForUndefinedKey:]: this class is not key value coding-compliant for the key calculatedMedian.
2007-12-15 00:23:53.205 pyave2[21268:10b] Cocoa Bindings: Error accessing value for key path calculatedMean of object (from bound object with object ID 381 in Nib named MainMenu.nib): [ valueForUndefinedKey:]: this class is not key value coding-compliant for the key calculatedMean.


Notice the Unknown class `Averager` in nib file?

That's our problem. The Python Class has not been imported. I opened up the generated *AppDelegate.py file and added the import and it worked!

Here's what my pyave2AppDelegate.py file looks like:

#
# pyave2AppDelegate.py
# pyave2
#
# Created by tbye on 12/12/07.
# Copyright __MyCompanyName__ 2007. All rights reserved.
#

from Foundation import *
from AppKit import *
import Averager

class pyave2AppDelegate(NSObject):
    def applicationDidFinishLaunching_(self, sender):
        NSLog("Application did finish launching.")


If there's enough interest I'll break out Skitch and completely rewrite an updated version of the this tutorial with XCode3 and the latest Interface Builder.

Comments [ 0 ]  |  Add a comment


CompUSA closing its doors

Tue Dec 11th 02:03:48 2007 *

It's sort of sad to see CompUSA closing... and then again, I think back on the last, man... I'd say at least a dozen trips I've made in there...

... haven't bought a thing.

It's crazy but the sticker shock is so incredible, that I just lose my tech appetite. I know that I've learned to control my impulse buying habits the past decade of my life. CompUSA pricing doesn't even start to tempt me.

I do regret the loss, but I don't believe they made many efforts to compete. Case in point... The last few times I've gone into Barnes and Noble... a bricks and mortar with formidable online competition... I've walked out with items I could've bought cheaper online, but I like what Barnes and Noble does. I like what they provide. I think they compete well. Their biggest problem is they are a 15 minute drive to reach their nearest location (in fact I'm smack dab in the middle between 2).

It's extremely maddening to think about the IT supplier options I'll be left with. All you folks within an hour of a Fry's can tape yourself to the ceiling.

There is but one sanctuary left for me.


Comments [ 0 ]  |  Add a comment


Blogotomy: Comment Management Updated

Sat Dec 8th 11:29:56 2007 *

So some of the work I did yesterday ended up being throw away code. That's okay though because I had goals and I learned a bit more about how ReL has this thing setup and PHP as well.

If you login and check out blog management and moderate the comments on one of your posts you'll see that no longer are you presented with delete links per comment. You get a check box. There is a master toggle... to turn on/off all checkboxes for comments. This makes it easy to clean out spam.. until I figure a way to get some of the comment spam filters installed.

So the mass delete all comments has gone out the door and the new system is in place. It worked well... the one day it was installed... hehehe.

Also, when you delete comments you return to the delete comments page. You used to go back to blog management.

I really dig what I ended up with.

Still a few things eating at me though...


  • The dead add comment link that appears after you've added a comment. Nuke the link altogether?

  • UPDATEAlter comments and add a spot for IP address collection... so spammers can be blocked once they've used an address (block?). This could be more bandage talk. It's in there just waiting to be populated!

  • I'd like to put IDs and classes on all elements in the entry template to allow for full customization. A better idea might be to allow folks to build their own template given a few vars and go hog wild. Include in other sites? Dare to dream I suppose.



Anyway, you all know it could be years before I get a Blogotomy coding bug again, so ask now or hold your peace until next time.

Comments [ 8 ]  |  Add a comment


Blogotomy: Older & Newer

Fri Dec 7th 20:39:43 2007 *

I couldn't think of any better names... but... this has been on my list for a long time.

I've added links to the bottom of everybody's blogs that will go forward and backward 10 entries. If you try and go further back than 0 then you just get 0. If you try and go back a billion entries, you get no entries.

Anyway, I hope someone besides me finds this remotely useful. There are times when I want to go back in time and see what I've written in the past.

I'm taking suggestions on features while I'm working this weekend. If you've been itching for something... it's a good time to ask.

Comments [ 0 ]  |  Add a comment


Blogotomy: Delete All Comments

Fri Dec 7th 17:48:41 2007 *

Wow... actually got it done.

I suck at PHP, so it's probably somewhat hax0r, but in your blog management screens under moderating comments you can now nuke all comments for a given article.

Tonight I'll work on allowing you to select multiple comments to nuke as well.

It's a start!

Comments [ 0 ]  |  Add a comment


WasteOfTime: Holiday Time-Off Randomizations

Fri Dec 7th 10:26:19 2007 *

Each December I take a long hard look at my vacation days that are about to go *POOF*. I get to roll over 5 days, or 5+1(per year of employment) or something like that. But about 2 weeks goes buh-bye. Frankly, for most of engineering, there's no such thing as a good time to take a vacation. I have to take the week off for Beaver, Utah, the trip to Hades with all the in-laws... (which is totally unfair. I have more and more fun there each year.) But other than that it is kiss off the days off.

I do make meager attempts in December to stash in days off... which usually means add additional days to work from home.

So in my attempts to actually enjoy my time off this year, I've made a shortish list of goals I wish to accomplish by year's end... well through the holidays anyway.

One of those goals is to fix up our comments system here. I seem to get spam bombed from time to time, so I'll be looking at reinforcing some checks. Depending on how ambitious I get here's a breakdown in order of importance, that I'll be following:


  • Nuke all comments for a given entry
  • Checkboxes in management to allow you to individually select comments for deletion
  • turn off comments for an entry
  • turn on moderate comments for an entry
  • turn off anonymous comments(entry, account)
More than enough to keep me busy.

There is one hangup though. Blogotomy is ancient in beta years... How much effort should I really be putting into this?

I'm interested to hear about your thoughts on personal blogs, and whether or not you see Blogotomy as worth the effort anymore.

Note: I'm not interested in your porn links and pharmaceutical ads. Spammers are terrorists.

Comments [ 0 ]  |  Add a comment


MoveNetworks: Red Herring Global 100: Top 100 tech startups in the world

Wed Dec 5th 23:29:38 2007 *

We already won a position on the domestic list but it's official! We're one of the 100 top tech startups in the world according to Red Herring!

Read more here...

Comments [ 1 ]  |  Add a comment


Hulu.com

Wed Dec 5th 23:22:31 2007 *

Loren brought his laptop by to show me Hulu today.

They've got their work cut out for them. But hey... we were there once... no... on second thought I think we skipped where they're at right now. That was 3 years ago so I forget the details.

Enjoy some real HD content at ABC.com.

Comments [ 0 ]  |  Add a comment


Upgrades in the Works

Tue Dec 4th 10:50:44 2007 *

Hi All,

My ISP has graciously granted me my own network block of addresses and that means I have to move off of my old addresses. While I never anticipate downtime, there is always a chance.

If you notice a loss of service at Blogotomy, please email me at tbye[removethispart]@tbye.com.

Thanks!

Ty

Comments [ 0 ]  |  Add a comment


MoveNetworks: Short Interview Video with VP David Rice

Fri Nov 30th 15:09:46 2007 *

Great job here by David Rice, one of our VP's at Move Networks.


Comments [ 0 ]  |  Add a comment


 

Older | Newer


About Me



I'm a software engineer by trade and a life pundit by hobby. Here you'll find musings about my family, my job, my toys and least important me.
View Tyler Bye's profile on LinkedIn
www.flickr.com
A Django site.
Visit my official website @ tbye.com.

© Copyright Blogotomy.com 2003-2008
Memberlist
7 viewers online
()  7 Guests