January 24, 2006

Universal, 10.3 and up Applescript Studio application

Filed under: Reanimate,ResearchAndDevelopment — Ryan Wilcox @ 11:43 pm

Introduction

Today I worked on making Helix Maintenance Manager, a universal binary. HMM is an AppleScript Studio application which needs to target Mac OS X 10.3 as well as Mac OS X 10.4. Since the steps to create an application under these exact situations seem to be helter-skelter, I’m combining them here, for a simple one, two, three checklist.

Something to note is that this app has a few Objective-C/Cocoa routines along with the AppleScript. Some of these steps might be irrelevant for ASK applications that have only AppleScript in them. On the other hand, I’m betting a great number of ASK applications include a few Objective-C/Cocoa routines anyway. I also started with an XCode “native” target, so if you are upgrading from say ProjectBuilder, you’ll need to Upgrade your Target to Native.

Targeting versions of Mac OS X earlier than 10.3.9 with your PPC builds is an easy thing, but you’ll need to use a different compiler (gcc 3.3 or lower) for your PPC builds, while using GCC 4 for your Intel builds. 10.3.9 is compatible with GCC 4.0, so if you’re only targeting that version, you can get away with the same compiler for both architectures. This article won’t touch on how to do that, but the Cross Development article from Apple’s Developer Website does mention this setting.

(more…)

October 29, 2003

N Step Program

Filed under: Reanimate — Ryan Wilcox @ 10:47 am

Tuesday I focused almost entirely on the backup options. Most of the backup options need to be run after the general pass/fail of the whole script. Why? Because if the script fails, we would need to (keep track of) and undo all of that stuff, in order to revert.

So we do all the options at the end. Since I’ve managed to progress my way, in code, to the end of the script, that’s what I worked on yesterday.

Being at the end makes forward progress slower, I think. Before I was able to jump over functionality and say “I’ll do that at the end”, or “I’ll think about that for a while and come back to it”. Now all of those things are catching up with me. I’ve got probably a quarter of my whiteboard filled with things I need to go back and do.
(more…)

October 28, 2003

I love FSRefs

Filed under: Reanimate — Ryan Wilcox @ 1:20 pm

I think I’ve got this right. Please correct me if I don’t.

With OS X, Apple recommends everybody use FSRefs to manage their file objects, instead of the old FSSpecs. FSRefs give you long file names, large files, and a slew of other things. Except you can’t use an FSRef to refer to a file that doesn’t exist.

So, right now everybody who programs in real languages (C/C++, Pascal, etc) have to remember this, and if they are referring to a new file, they use FSSpecs (which always could refer to new files.) Very annoying, but one can work around it (there are system calls to go from FSRefs to FSSpecs).

Now, I ran across this limitation in Python once, and I just did in Applescript. Here’s the problem:
(more…)

September 24, 2003

Fun AppleScript Tricks (or not)

Filed under: Reanimate — Ryan Wilcox @ 3:56 pm

Take a look at the following Applescript. What do you expect to happen in both cases?

Snippet #1

set ab to {"a", "b"}
set alpha to {"a", "b", "c", "d"}

if ab is in alpha then
log ("ab in alpha")
else
log ("ab not in alpha")
end if

Snippet #2

set ab to {"a", "c"}
set alpha to {"a", "b", "c", "d"}

if ab is in alpha then
log ("ab in alpha")
else
log ("ab not in alpha")
end if

Click below for the answer to the riddle
(more…)

September 5, 2003

Sometimes Ya Gotta Look At It Differently…

Filed under: Reanimate — Ryan Wilcox @ 12:53 am

So I’ve been having problems with AppleScript Studio. A whole lot of problems, actually. And it all started when I tried to put a new component on my application…
(more…)

August 26, 2003

AppleScriptStudioRants

Filed under: Reanimate — Ryan Wilcox @ 3:04 pm

I had created most of this entry on Tuesday, and just got around to polish it off. Sadly, Friday is another AppleScript Studio day.. there may be another one of these rants coming out Monday or so.

Or the situation might turn around and be all roses.

But here’s my rant…
(more…)

August 2, 2003

Most Refactoring Done, Settings Summary Work

Filed under: Reanimate — Ryan Wilcox @ 2:50 am

Most of the refactoring (properties are now in DocumentModel instead of Document.. thank you AppleScriptStudio for not loading a seperate instance of Document for each document) is done.

I just need to link in the Schedule tab (something I hadn’t done at all), and the Save tab (although that should be mostly done).

Started on the Settings Summary field… I’m hoping this isn’t really slow. I’ve pulled some AppleScript tricks that (I hope) will make things faster (appending every line to a list, then transforming that list into a string later).. but string twisting is not AppleScript’s forte.