• 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: Problem saving a new file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem saving a new file


  • Subject: Re: Problem saving a new file
  • From: Axel Luttgens <email@hidden>
  • Date: Sun, 21 Oct 2012 23:30:35 +0100

Le 21 oct. 2012 à 20:47, Nigel Garvey a écrit :

> Axel Luttgens wrote on Sun, 21 Oct 2012 12:47:56 +0100:
>
>> Looks like application sandboxing enters into the game with the above.
>> Just put the path to call outside of the tell block, and the "regular"
>> Documents folder is available again:
>>
>> 	set newFile to (((path to documents folder) & "Test_File.rtf") as
> text) as
>> «class furl»
>
> Hi.
>
> If you'll excuse my butting in with an observation: concatenating a text
> to an alias produces a list and coercing a list to text is influenced by
> the current value of AppleScript's text item delimiters. A more
> efficient and delimiter-proof phrasing of the above is:
>
>  set newFile to ((path to documents folder as text) & "Test_File.rtf") as «class furl»
>
> 'as text' is here a parameter of 'path to', not a coercion.

Hello Nigel,

Yes, in fact I was initially of the intent of suggesting the following as a side note,

	set newFile to ("" & (path to documents folder) & "Test_File.rtf") as «class furl»

as an improvement of the above, but then decided to stay as close as possible to Christopher's intial proposal, without additional peripheric comments; after all, the main idea was to try to explain an observed "bizarre" behavior, not to enter into a discussion about Applescript's coercion rules.

But well, your note now leads me to believe I should have done it.
Damn. ;-)

Axel


 _______________________________________________
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


References: 
 >Re: Problem saving a new file (From: Nigel Garvey <email@hidden>)

  • Prev by Date: Re: Problem saving a new file
  • Next by Date: Adobe PhotoShop equiv to InDesign's ``set user interaction level of script preferences to never interact''
  • Previous by thread: Re: Problem saving a new file
  • Next by thread: Re: Problem saving a new file
  • Index(es):
    • Date
    • Thread