Any tips on the "fastest" way to put values into a document? I currently seem to have to loop through and insert values into one cell at a time like so:
(assume a 5 column document--three added to default)
tell application "OmniOutliner" to tell document 1
set theNewRow to make new row at end
repeat with i from 2 to 5
set the value of cell i of theNewRow to "foobar" & i
end repeat
end tell
My understanding is that you can speed things up by reducing the number of Apple Events so I figure that:
tell application "OmniOutliner" to tell document 1
set theNewRow to make new row at end
set the value of every cell of theNewRow to "foobar"
end tell
is probably faster, but I would also like to see a way to set each cell in the row (or column, or block) to a different value. Is there a way to do this? I'm using oo3.
Thanks in advance,
-N
(assume a 5 column document--three added to default)
tell application "OmniOutliner" to tell document 1
set theNewRow to make new row at end
repeat with i from 2 to 5
set the value of cell i of theNewRow to "foobar" & i
end repeat
end tell
My understanding is that you can speed things up by reducing the number of Apple Events so I figure that:
tell application "OmniOutliner" to tell document 1
set theNewRow to make new row at end
set the value of every cell of theNewRow to "foobar"
end tell
is probably faster, but I would also like to see a way to set each cell in the row (or column, or block) to a different value. Is there a way to do this? I'm using oo3.
Thanks in advance,
-N