Re: Convert HTML Text to Plain Text
Re: Convert HTML Text to Plain Text
- Subject: Re: Convert HTML Text to Plain Text
- From: Shane Stanley <email@hidden>
- Date: Thu, 30 Jun 2016 11:11:15 +1000
On 30 Jun 2016, at 10:56 AM, Jim Underwood <email@hidden> wrote:
>
> May I ask, for my (and others) edification, what effect the options parameter has on the extraction of plain text from HTML text?
It's unnecessary. There are a few variations on initWithHTML:, and at the time I missed the simpler one.
>
> Also, what is the benefit of using the property statement to set the ASObjC objects?
For most Cocoa terms, it just moves all the "current application's" out of your actual code, making it a bit shorter and hopefully more readable.
In the case of enums, you can see that it's using a direct integer value. There are a few advantages to that:
* It's a fraction more efficient than evaluating at run-time,
* It leaves you covered in the event that Apple changes an enum (not common, but it has and does happen),
* It is more reliable if the script has to run under Yosemite or earlier, and
* It makes code simpler and clearer where multiple enums need to be summed.
It's a pain to do manually, but Script Debugger 6's code-completion can do it all automatically.
--
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>
_______________________________________________
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