On 12/10/2008, Steffen wrote in message
:
> I would like to write every found file into every line of the table
> view. I wrote this:
>
> on clicked theObject
>
> tell data cell "Cell" of table column "Column" of table view "Table" of
> scroll view "Outline" of window "Program"
> set content to "Hello"
> end tell
>
> end clicked
>
> How can I write the content of the folder into line 1 to line x?
The usual way is to supply the names of the contents of the folder as a
data source. A data source is a data structure you can set up around the
data you took from the Finder. The system will have ways of asking your
data source how many lines it has and what's on each line.
Then you just connect the table view to your data source (one operation in
Interface Builder). When the system wants to know what to show in the
table it just asks your data source: "What should appear in column 1 of
row 6 of the table ?". Your data source supplies the data, and the system
draws the right things in the table. Here is information on 'table view'
programming:
http://developer.apple.com/documentation/AppleScript/Reference/StudioRefere
nce/sr6_data_suite/sr_data_view.html
You'll see a section called 'Using a Table Data Source' which is what I
was talking about above.
However, this may not be enough to let you figure out how to implement
data views in your software. I know it's a long way around, but one way
to learn this stuff is to complete the Mail Search Tutorial which is part
of the AppleScript Studio documentation. You can find it as part of your
online help, or here:
http://developer.apple.com/documentation/AppleScript/Conceptual/StudioBuild
ingApps/chapter07/chapter_7_section_1.html
Once you've done it once with their table and their data, it should be
easier to figure out how to do it with your table and your data.
Hope this helps. Don't hesitate to come back if you have further
questions after completing enough of the Mail Search Tutorial to include
the data source stuff.
Simon.
--
http://www.hearsay.demon.co.uk >> Stay informed about: How to create clickable list in table view?