hey guys,
I’m trying to find the most efficient way of bring a column of a SQLite3 database into Table View using Magic Bindings.
What I’m currently doing works but there must be a faster way of doing it.
script EncoderReportAppDelegate
property parent : class "NSObject"
property theData : missing value
on applicationWillFinishLaunching_(aNotification)
set head to "sqlite3 ~/desktop/MasterList.db " & "\""
set tail to "\""
set selectIt to "select Movie from MasterList where DeliveryDate = '' Order by Movie; "
set itt to paragraphs of (do shell script head & selectIt & tail)
set repTimes to number of items of itt
set x to 1
set my theData to {}
repeat repTimes times
set my theData to {{filmTitle:item x of itt as text}} & my theData
set x to x + 1
end repeat
end applicationWillFinishLaunching_
on applicationShouldTerminate_(sender)
-- Insert code here to do any housekeeping before your application quits
return current application's NSTerminateNow
end applicationShouldTerminate_
end script
Thanks Yo