• 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: AS Application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AS Application


  • Subject: Re: AS Application
  • From: Philip Aker <email@hidden>
  • Date: Tue, 29 Sep 2009 05:27:41 -0700

On 2009-09-28, at 06:45:54, Steffan A. Cline wrote:

Aside from the file chooser not allowing anything issue under Swedish localized OS, I came across another issue. My code seems to NOT be always drawing the correct original path in the save as dialog. If the app opens and saves the file with no user interaction, it works fine. This issue happened with another user under Swedish localization.

Anyone seen this or should I post it to the bug reporter?

A few years ago, on another scripting list, there were a lot of problems being reported by a guy with a Swedish setup. Had to do with canonically decomposed character sets. So one potential problem area could be that you are rolling your own for path splitting, etc. Here's an example which bypasses those areas. No guarantee that it will perform any better on a Swedish system but it could be a step towards locating the source of the problem…

on yui_compress(theFileAlias)
set finfo to info for theFileAlias
set pp to POSIX path of theFileAlias
set ext to name extension of finfo
if (ext is not in {"js", "css"}) then
display dialog "The extension \"" & ext & "\" is not supported by the YUI compressor." buttons {"OK"} default button "OK" with icon stop
return
end if
set prefix to (do shell script "tclsh <<< 'puts [file rootname {" & pp & "}]'")
set newname to prefix & ".min." & ext
set jar to (quoted form of POSIX path of (path to resource "yuicompressor-2.4.2.jar"))
set java to "java -jar " & jar & " " & (quoted form of pp) & " -o " & (quoted form of newname) & " --charset utf-8"
try
do shell script java
on error errs number errn
if (errn is not -128) then
display dialog "Problem with: " & pp & return & return & errs buttons {"OK"} default button "OK" with icon stop
end if
return
end try
end yui_compress

on open theFileList
repeat with f in theFileList
yui_compress(theFileList)
end repeat
end open

on run
set choice to choose file with prompt "Select a .js or .css file to be minimzed." of type {"js", "css"} with multiple selections allowed
open choice
end run





Philip Aker
echo email@hidden@nl | tr a-z@. p-za-o.@

Democracy: Two wolves and a sheep voting on lunch.

 _______________________________________________
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: AS Application
      • From: "Steffan A. Cline" <email@hidden>
References: 
 >Re: AS Application (From: "Steffan A. Cline" <email@hidden>)

  • Prev by Date: Re: check alias
  • Next by Date: Re: Detecting when URL has been loaded in Safari???
  • Previous by thread: Re: AS Application
  • Next by thread: Re: AS Application
  • Index(es):
    • Date
    • Thread