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: Table and Applescript Studio



On 03-08-11 16.39, "Mark Butcher" <email@hidden> wrote:

> I'd first get the table working, and populate it with a simple list of
> strings {{"A", "1"}, {"B", "2"}}.

Thought I would go ahead and make a try while waiting for the book but got
this far but still can't populate the table:

on clicked theObject
(*Add your script here.*)
end clicked

on will open theObject

tell application "Finder"
set PathtoKlassfil to (folder "Foto:text" of desktop) as string

set klassTextfiler to (every file of the folder PathtoKlassfil) as
string
display dialog test as string
end tell

set datasource to data source of table view "filtable" of scroll view
"scroller" of window "tablewin"
--set update views of datasource to false
tell datasource
--delete data columns
make new data column at the end of the data columns ,
with properties {name:"Antal"}
make new data column at the end of the data columns ,
with properties {name:"Filnamn"}
--delete data rows
end tell

repeat with n from 1 to (count files of klassTextfiler)

set theRow to make new data row at the end of ,
the data rows of datasource

--set contents of data cell "Antal" of theRow to ,
-- item 1 of item n of test
set contents of data cell "Filnamn" of theRow to ,
item n of klassTextfiler
--tell table view "filtable" of scroll view "scroller" to update

end repeat
--set update views of datasource to true

end will open


/Johan
_______________________________________________
applescript-studio mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-studio
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Table and Applescript Studio (From: Mark Butcher <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.