Re: Lists to XML ?
Re: Lists to XML ?
- Subject: Re: Lists to XML ?
- From: Shane Stanley <email@hidden>
- Date: Sat, 25 Mar 2017 10:06:55 +1100
On 25 Mar 2017, at 9:59 am, Jean-Christophe Helary <email@hidden> wrote:
I don't understand the syntax of the line:
(listElement's addChild:newNode)
It's just a shorter way of writing:
tell listElement to its addChild:newNode
Using the "tell" version you need the "its" to retain the interleaved formatting, so using the possessive form is simpler. You're telling an object (listElement) to call the addChild: instance method
Also, the longer line is creating an instance of a class, right ? So that's the reason why we need to have "current application", is that correct ?
You need "current application" wherever you are using Cocoa terms, so AppleScript knows they are not just AppleScript variables.
|
_______________________________________________
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