• 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: Lists to XML ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

-- 
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>, <latenightsw.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

  • Follow-Ups:
    • Re: Lists to XML ?
      • From: Jean-Christophe Helary <email@hidden>
References: 
 >Lists to XML ? (From: Jean-Christophe Helary <email@hidden>)
 >Re: Lists to XML ? (From: Shane Stanley <email@hidden>)
 >Re: Lists to XML ? (From: Jean-Christophe Helary <email@hidden>)

  • Prev by Date: Re: Lists to XML ?
  • Next by Date: Re: Lists to XML ?
  • Previous by thread: Re: Lists to XML ?
  • Next by thread: Re: Lists to XML ?
  • Index(es):
    • Date
    • Thread