Welcome to MacForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

How to create clickable list in table view?

 
   Macintosh computer (Home) -> Apple Scripts RSS
Next:  Question about thumb drive for Mac  
Author Message
Steffen

External


Since: Oct 09, 2008
Posts: 2



(Msg. 1) Posted: Thu Oct 09, 2008 3:28 pm
Post subject: How to create clickable list in table view?
Archived from groups: alt>comp>lang>applescript (more info?)

Hello,

how can I write a list of the content of a folder into a table view
(Interface Builder + AppleScript Studio)? The user should click on each
row then to select an entry. I am new with XCode and Interface Builder
and need some help.

Thank you,
Steffen

--
Die Newton-Seite:
http://home.arcor.de/steffen.bendix/Newton

 >> Stay informed about: How to create clickable list in table view? 
Back to top
Login to vote
Simon Slavin1

External


Since: May 16, 2004
Posts: 375



(Msg. 2) Posted: Sat Oct 11, 2008 8:07 pm
Post subject: Re: How to create clickable list in table view? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 09/10/2008, Steffen wrote in message
:

> how can I write a list of the content of a folder into a table view
> (Interface Builder + AppleScript Studio)? The user should click on each
> row then to select an entry. I am new with XCode and Interface Builder
> and need some help.

Well, there are two elements to that: gathering the list of items in the
folder, and putting some text items into a table view. Test each part
separately and tell us which one you're having problems with.

The first part can be done by telling the Finder to find the contents of a
folder. Look for scripts which include

tell application "Finder"

and the words 'contents of'.

The second part is a mundane question of filling a table view (which you
would, presumably, make using Interface Builder). Look for any
programming examples which involve table views.

If you have a specific question, post again.

Simon.
--
http://www.hearsay.demon.co.uk

 >> Stay informed about: How to create clickable list in table view? 
Back to top
Login to vote
Steffen

External


Since: Oct 09, 2008
Posts: 2



(Msg. 3) Posted: Sun Oct 12, 2008 4:25 am
Post subject: Re: How to create clickable list in table view? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Simon Slavin
wrote:

> The second part is a mundane question of filling a table view (which you
> would, presumably, make using Interface Builder). Look for any
> programming examples which involve table views.

This is exactly my question. It is no problem to get the file list from
the Finder but I don't get it into the table view although I used
example scripts.

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?

Thanks,
Steffen

--
Die Newton-Seite:
http://home.arcor.de/steffen.bendix/Newton
 >> Stay informed about: How to create clickable list in table view? 
Back to top
Login to vote
Simon Slavin1

External


Since: May 16, 2004
Posts: 375



(Msg. 4) Posted: Thu Oct 16, 2008 6:25 pm
Post subject: Re: How to create clickable list in table view? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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? 
Back to top
Login to vote
Display posts from previous:   
   Macintosh computer (Home) -> Apple Scripts All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]