Found 26 entries, viewing 6 through 10.
UTOSC Slides and Related Files
I presented at UTOSC this year, presenting a series of tips and best practices that I've learned from Oggify. Entitled Things I've Learned From Oggify, the slides are available on the conference site. There are a few files I used in the presentation which I have put in a tar and uploaded. Enjoy!
Blog Update | Django 1.0
The blog code has been updated to be compliant with the recent release of Django 1.0. And a small patch from Jeff.
Building Cocoa GUIs in Python with PyObjC, Part Four
Creating an Open Dialog
Our controller doesn't really do anything at this point. We'll begin by adding an open dialog for the user. This will require us to really delve into the Objective C bridge provided by PyObjC. We'll start by reading some documentation that ships with Xcode.
Let's launch the local documentation browser in Xcode. Under "Help" click "Documentation". In the newly opened documentation browser select the "Mac OS X 10.5" documentation set and search for NSOpenPanel. This is the class we'll be working with to create our open dialog. Have a look through the documentation, then let's code.
First we do some basic stuff, creating the object and setting some permissions. A modified open method on our controller.py looks like this:
filetypes = ('mp3', 'ogg', 'mp4', 'flac', 'm4a', 'm4p')
@IBAction
def open_(self, sender):
panel = NSOpenPanel.openPanel()
panel.setCanChooseDirectories_(NO)
panel ...
Building Cocoa GUIs in Python with PyObjC, Part Three
Writing A Python Controller
First let's add your new controller into the GUI. Add an object from "Objects & Controllers" into your GUI. Now click on it and bring up the "Identity" tab in the inspector. The first drop-down lets you select a class, find "controller" and pick it.
Now Open up your newly created controller.py with your favorite text editor, and we'll begin.
#
# controller.py
# QuickTag
#
# Created by Scott Paul Robertson on 6/11/08.
# Copyright (c) 2008 __MyCompanyName__. All rights reserved.
#
from objc import YES, NO, IBAction, IBOutlet
from Foundation import *
from AppKit import *
class controller(NSWindowController):
pass
There are two parts we will be adding, the Outlets (variables) and Actions (methods). first lets add a few outlets to the class controller.
name = IBOutlet()
artist = IBOutlet()
albumArtist = IBOutlet()
album = IBOutlet()
...
These class variables can now be connected to various fields in your GUI. In Interface Builder ...
Drafts Do Not Go Into The Feed
Remember kids, do not feed your feed drafts. It is unprofessional.
Blog updated to filter out drafts in the RSS feed.

