Mailing Lists: Apple Mailing Lists

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

Get Formatted Data From Data Cells



I orginally posted this question at Macscripters on Friday. So far nobody has been able to help so maybe someone here knows the answer.



I am in the process of creating a simple Invoice application for my wife's side business. Commercial apps are overkill for her needs. I have set up a document-based ASS project with an Input window and an Output window.

The Input window has three tables (for materials, labor, payments received) using data sources. At least one column in each of these tables has a formatter attached to it to display values in dollar amounts.

I need to take this data and transfer it to my Output window. This window is the invoice that will be output to a printer. I have 4 text fields fields that I am using as columns for the itemized portion of the invoice. If I attach a formatter to the text fields that contain the dollar amounts from the Input window, nothing is added to those text fields. If I use the data as supplied from the data sources, I get only decimal numbers without any dollar formatting.

I know how to get fomatted data from a text field (using obj-c calls) but I can't get the same routine to work for tables. This is the code that I use for text fields:



Code:
to GetTextString(theField)
set theValue to the content of theField
set theFormatter to call method "formatter" of object theField
set theString to call method "stringForObjectValue:" of object theFormatter with parameter theValue
return theString
end GetTextString

What do I need to do to get this to work for data cells of a data source?


Thanks in advance,
Brad Bumgarner, CTA
-----
HOUSEPLANTS: vegetable companions; pleasant green pets that rarely bite or throw up on the carpet. -- The Cynic's Dictionary
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-studio mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-studio/email@hidden

This email sent to 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.