• 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: a handler runs after compile, but never again
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: a handler runs after compile, but never again


  • Subject: Re: a handler runs after compile, but never again
  • From: Michelle Steiner <email@hidden>
  • Date: Sun, 30 Nov 2003 09:08:25 -0700

On Nov 30, 2003, at 8:40 AM, Matyas Ferenc Farkas wrote:

there is the troublemaker:

The problem is that you named a variable within the handler the same as the handler. I don't know why this is a problem, but by changing the name of the variable, I was able to fix it.

I also simplified the script a bit while I was at it. Here's what I wound up with:

--tell application "Finder"
set filepathstring to "Macintosh HD:Users:spoun:Desktop:demofolder:mappa Ordner:mappa2:mappa3:"
log theContainer(filepathstring) of me
--end tell

on theContainer(filepath)
--tell application "Finder"
set AppleScript's text item delimiters to ":"
set aContainer to (filepath's text items 1 thru -3) as string
set AppleScript's text item delimiters to ""
set aContainer to aContainer & ":" as string
--end tell
return aContainer
end theContainer

Note that I commented out the tell wrappers; there is nothing in the script or the handler that requires the Finder. There might be other lines in your code that require the Finder, so I commented out rather than delete.

--Michelle

--
You can not change the world without perforce changing yourself.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: a handler runs after compile, but never again
      • From: Paul Berkowitz <email@hidden>
References: 
 >a handler runs after compile, but never again (From: Mátyás Ferenc Farkas <email@hidden>)

  • Prev by Date: Re: list disks on Panther
  • Next by Date: Re: list disks on Panther
  • Previous by thread: a handler runs after compile, but never again
  • Next by thread: Re: a handler runs after compile, but never again
  • Index(es):
    • Date
    • Thread