Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Currency Numbers




On 26 Jun 2006, at 11:34, David Bradley wrote:

Cheers kai,

Your code below worked a treat. I did treat other suggestion but they only gave me one decimal place.

However, I have had to put it as straight code rather than as a handler due to the fact that I get the error: Can't continue currency_format.

I had written the call to the handler as follows:

set strCatBSP to currency_format(strCatBSP)

I have tried to call the handler will being within 'tell application "Finder"' and 'tell application 'MacSQL3"', just in case this made a difference. Does it?

Yes, David - a slight different syntax is needed when calling a script handler from within an application tell statement. In this case, for example, Finder doesn't understand the expression 'currency_format(strCatBSP)' and throws an error. To tell it to redirect the call back to the script (which will understand it), qualify it with something like 'my' or 'of me':


-------------
set strCatBSP to my currency_format(strCatBSP)
-------------

Or:

-------------
set strCatBSP to currency_format(strCatBSP) of me
-------------

However, since the handler in this case contains just a single line, there's no real need for a separate handler - and using the line within the main code should be just fine... :-)

---
kai


_______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/applescript-users/email@hidden

This email sent to email@hidden
References: 
 >Currency Numbers (From: David Bradley <email@hidden>)
 >Re: Currency Numbers (From: Gary Tate <email@hidden>)
 >Re: Currency Numbers (From: David Bradley <email@hidden>)
 >Re: Currency Numbers (From: kai <email@hidden>)
 >Re: Currency Numbers (From: David Bradley <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.