• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Script Objects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Script Objects


  • Subject: Re: Script Objects
  • From: Jon Pugh <email@hidden>
  • Date: Tue, 19 Jan 2010 10:53:30 -0800

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.


>The only reason I use them (and I don't use them that much) is that in some
>cases they dramatically reduce the execution time for specific tasks.

Which is undoubtedly just an implementation quirk.  Did either Chris ever figure out what's happening under the covers?


>I toyed with them in Script Debugger but found that even then they were more
>trouble than they were worth.

Worth is a value judgement, but I've used them occasionally and to good value, but normally I don't bother.  Scripts tend to be straight line functions, not complex UI programs.  Shane's comment about objects being necessary for ASObjC is pretty much right on.


>I used them in Classic because of the built-in limits on the size of
>scripts, but that's no longer an issue. My scripting life is much simpler
>now as a result.   My solution for reusable code is to reuse handlers and
>make long scripts and those run just fine.

This is pretty much the C-style coding convention.  There's nothing wrong with it and it sounds like there's no reason for you to use script objects.

Jon
 _______________________________________________
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

  • Follow-Ups:
    • Re: Script Objects
      • From: Shane Stanley <email@hidden>
References: 
 >Re: Script Objects (From: "Stockly, Ed" <email@hidden>)

  • Prev by Date: Re: Script Objects
  • Next by Date: Re: Script Objects
  • Previous by thread: Re: Script Objects
  • Next by thread: Re: Script Objects
  • Index(es):
    • Date
    • Thread