Filtering table rows, cant this work?


I have discussed filtering datasources with tassillio, and I found out that it may be possible. The thing is that I’m still a novice in AAS so I dont know how to do this right now.
My question is not if you could write the code for this, but if my conclution is right:

  1. fill in the search word in a text field.
  2. Press enter
  3. Make the spinning wheel start
  4. Create a new_dataSource
  5. Find the records that has the current word. Lopp or repeat to find records in the old dataSource and place the found data rows in the new_dataSouce
  6. change the table data source to the new_dataSource
  7. update the table with the new dataSource
  8. when the user clicks on the (X) button in the search text field, you connect the old dataSource in the table and update.

One other question, I know some C, and I wonder if it would be quicker to throw the old dataSource to a C handler that searches and then returns the identifiers for the searched rows to the new_dataSource?

And one more thing, is it possible to switch the dataSouce for a table at runtime?
This would be really cool if we could get this working, and if I do, I’l post the C-files.

Kind regards

Mika Sjöman


I have created a filterable table using the basic steps you outlined. On top of that, there was no need start the spinning wheel because it was quick for my filter.

As for your C question, I am unsure if there would be any gains. The pure AppleScript solution works great for me.