Friday, June 29, 2007

In Cape Cod

I'm in Cape Cod, which I've just realized, is named after a fish.

It was a long drive.

Anywho, I've totally mastered NSCreateCommand now, with my new fixes, and shouldn't have much trouble finishing my previous problems with AIAccount.

Now, I'm on to trying to make a chat, which involves making a chat window... We'll see how that goes...

Tuesday, June 26, 2007

Plan for today...

• Figure out if it's worth trying to override performDefaultImplementation for AICreateCommand to try to get rid of that stupid default alloc'ing behavior.

Yes, it is. The trick is to use a private API method to get the implementing class name. Here's the final code block (edit: while the previous code was nice, the new code is actually useful):

- (id)performDefaultImplementation
{
#warning This uses a Private API
NSScriptClassDescription *newObjectDescription = [self createClassDescription];
Class createdClass = NSClassFromString([newObjectDescription implementationClassName]);

id target = [self subjectsSpecifier]; //handy method from Dustin Voss on applescript-implementors

id r;
if ([target respondsToSelector:@selector(makeScriptingObjectOfClass:withParameters:)])
{
//this can do the insert, based on the parameters, methinks.
r = [target makeScriptingObjectOfClass:createdClass withParameters:[self resolvedKeyDictionary]];
}
else
r = [super performDefaultImplementation];

if ([r isKindOfClass:[NSScriptObjectSpecifier class]])
return r;

return [r objectSpecifier];
}
- (id)subjectsSpecifier
{
NSAppleEventDescriptor *subjDesc = [[self appleEvent] attributeDescriptorForKeyword: 'subj'];
NSScriptObjectSpecifier *subjSpec = [NSScriptObjectSpecifier _objectSpecifierFromDescriptor: subjDesc inCommandConstructionContext: nil];
return [subjSpec objectsByEvaluatingSpecifier];
}

My friend Matt...

...is sitting next to me, and is trying to comprehend blogging. I can't quite figure out how to explain it to him.

Any suggestions?

Monday, June 25, 2007

Done!

I completed my tasks for today. The feature list now covers most of the features that the sdef does. Now that I've sent out a request for comments, I expect that many more ideas will come my way.

Plan 1

• Finish Adium's Unit Tests, viewable at http://trac.adiumx.com/wiki/FixAndExpandAppleScriptSupport
• Post blog report when done on Adium's blog.
• Send email to adium-devl, with information about the unit tests.

Sunday, June 24, 2007

First Note!

Well, this is my Hello, World! of the blogging world, and my first ever blog post. It's not nearly as momentous as it sounds.

This blog will stand as a listing of what I'm doing in the way of projects... I'll be sure to include helpful information about coding, especially in AppleScript.

I look forward to hearing your comments!