retrieving contents of first data cell in selected rows in outline vie

Can anybody correct this, please?

It logs the number of the selected rows ok but fails to log
I select some children rows and then run this from a menu command.
The parent
the children
Guitar Rig 2 -.bnk
/Volumes/Macintosh HD//Applications/Guitar Rig 2/Preset Banks/- Guitar Rig 20 -.bnk
/Volumes/Macintosh HD//Applications/Guitar Rig 3/Preset Banks/- Guitar Rig 32 -.bnk

on GetMyInfo()
        set theSelectedRows to selected rows of outline view "outlineView" of scroll view "scrollView" of window "main"
	log theSelectedRows as text
	repeat with thisRow in theSelectedRows
		log (contents of data cell "name" of data row thisRow of outline view "outlineView" of scroll view "scrollView" of window "main") as text
	end repeat
end getMyInfo

The log command can be frustrating. Sometimes I found that if I get the value into a variable and then log the variable it works… so try this…

set myValue to contents of data cell "name" of data row thisRow of outline view "outlineView" of scroll view "scrollView" of window "main"
log myValue

And sometimes you are in an application tell block of code which doesn’t know the log command, so sometimes you have to use this…

tell me to log myValue

Thanks for that regulus6633,

I tried it but unfortunately, even with the tell me I still get error: Can’t get data row 2 of outline view “outline view” of scroll view “scrollView” of window “main” -1728

-1728 means that an object could not be found.

Success, by golly I got it!
You have to ask the data source to do it for you.
tell dataSource mySource to set theFile to contents of data cell “name”

 set thisRow to item i of theSelectedRows
		tell data source of outline view "outlineview" of scroll view "scrollView" of window "main"
			set myContent to contents of data cell "name" of thisRow
		end tell
tell me to log myContent as text