• 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: calling one procedure from with in another
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: calling one procedure from with in another


  • Subject: Re: calling one procedure from with in another
  • From: Paul Skinner <email@hidden>
  • Date: Fri, 4 Jan 2002 07:14:04 -0500

This is an issue of handler (procedure) scope. Try putting 'my' in front of the call to Truncate. If this doesn't correct the behavior then perhaps you have the truncate handler in an explicit script block and the call outside of it.
Try to put both of your handlers at the same level in your script. If that's not possible then find the name of the explicit script containing the Truncate handler and call Truncate like so..."explicitScriptName's Truncate()"

Example...

script joe
on makeUpANumber()
return random number 10
end makeUpANumber
end script

on BeepRandomly()
set n to joe's makeUpANumber()
beep n
end BeepRandomly

BeepRandomly()


On Wednesday, January 2, 2002, at 11:48 AM, Robert Castles wrote:

I'm getting an error "Finder got an error: Can't continue Truncate" when
trying to call a procedure from within another procedure. I've tried placing
the command within Finder, Script Editor, and other application tell
statements and the same error keeps coming up. Any ideas?

Thanks,
Bob
--
Paul Skinner


  • Prev by Date: Re: How can i do? ..... release 2
  • Next by Date: Re: A problem when reading/writing to a text file
  • Previous by thread: Re: calling one procedure from with in another
  • Next by thread: Top 20
  • Index(es):
    • Date
    • Thread