Re: Script Objects
Re: Script Objects
- Subject: Re: Script Objects
- From: Shane Stanley <email@hidden>
- Date: Wed, 20 Jan 2010 10:15:03 +1100
- Thread-topic: Script Objects
On 20/1/10 5:53 AM, "Jon Pugh" <email@hidden> wrote:
> At 10:25 AM -0800 1/19/10, Stockly, Ed wrote:
>> I don't like Script Objects because they're a pain to debug.
>
> As if debugging in AppleScript is joyous to begin with. Amusingly, as a long
> time Script Debugger user, I *never* use the debugger. I build my scripts
> line by line and use logging, "display dialog" and the result window to ensure
> that my code works, but I'm a very experienced programmer and AppleScript
> expert and mostly write little utility scripts which operate on my C++ source
> code files.
I think the debugging problem is *the* objection. I'm not a heavy user of
SD's debugger, but I am a heavy user of logs. Sure, you can use "display
dialog" with script objects, but you can't even log stuff.
If you're using objects as reusable modules, and you have something like
your text utilities, this doesn't matter. But if you're doing a project
where you're building and refining the bits you're loading at the same time
as the main script, it's a major pain.
One of the wonderful things in FaceSpan 5 (RIP) was the ability to break
code into modules, but still be able to step through them.
> Shane's comment about objects being necessary for ASObjC
> is pretty much right on.
One of the ironies is that ASObjC means using Xcode, and that means no event
log, so debugging can be harder. Yet it also means you can use the console
to log stuff, and you can therefore log from multiple script objects. This
makes modularising scripts much more attractive.
--
Shane Stanley <email@hidden>
AppleScript Pro, April 2010, Florida <http://www.applescriptpro.com>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden