Hi!
After a couple of years finding every answer to any applescript related question I could think of, I’m finally having a problem I can’t solve and can’t find an answer nor here or everywhere else on the net… So here’s the problem:
I’m scanning two different folders and put all the files (and folder) in the same data source. Set sorting to true and connect the data source to an outline view. But the outline doesn’t sort. Even when I use a ‘on column clicked’ to sort to a column, nothing happens.
It look likes the outline view isn’t able to sort when used in applescriptstudio! Is this true or am I overlooking something?
on awake from nib theObject
show window "main"
set vDataSourcePluglist to make new data source at end of data sources with properties {name:"pluglist"}
tell vDataSourcePluglist
make new data column at end of data columns with properties {name:"switch", sort order:ascending, sort type:alphabetical, sort case sensitivity:case insensitive}
make new data column at end of data columns with properties {name:"pluginname", sort order:ascending, sort type:alphabetical, sort case sensitivity:case insensitive}
make new data column at end of data columns with properties {name:"version", sort order:ascending, sort type:numerical, sort case sensitivity:case insensitive}
make new data column at end of data columns with properties {name:"path", sort order:ascending, sort type:numerical, sort case sensitivity:case insensitive}
end tell
-->>Get all default plugins
set vPath2PluginsEnabled to (vPath2PluginsEnabled as POSIX file)
set vPath2PluginsDisabled to (vPath2PluginsDisabled as POSIX file)
my fGetDefaultPlugins()
tell vOutlinePlugList to register drag types {"itemsdefault", "file names"}
set sorted of vDataSourcePluglist to true
set sort column of vDataSourcePluglist to data column "pluginname" of vDataSourcePluglist
set data source of vOutlinePlugList to vDataSourcePluglist
if vExpandAllGroups is true then
--call method "expandItem:expandChildren:" of vOutlinePlugList with parameters {call method "itemAtRow:" of vOutlinePlugList with parameter (0), true}
set t_end to 0 -- row is 0 based
repeat with i from 0 to t_end
call method "expandItem:expandChildren:" of vOutlinePlugList with parameters {call method "itemAtRow:" of vOutlinePlugList with parameter (i), true}
set t_end to call method "numberOfRows" of vOutlinePlugList --update t_end after row expanded
end repeat
end if
tell vOutlinePlugList to update
end awake from nib
I’ve already made a bunch of other application with tables and never had trouble with sorting… So any help would be very appreciated…