TableTool
TableTool copied to clipboard
Search & Replace?
Seems, S&R is not supported. Any chance it will be added? A S&R limited to one column would be nice as well.
Good idea! Would be an awesome feature. Unfortunately I don't have any time right now to implement it myself, but if someone would like to try it, I'd be glad to give a few pointers in the right direction.
Well, I'm not an OSX developer nor am I very good at Obj-C ... However, please let us know your hints. Maybe I try to bite the bullet.
Step 1 would be to evaluate which API to use for displaying the interface for search and replace.
-
We could use the Find Panel, which is the deprecated old interface, but it is more versatile. The find panel opens in a new window and has lots of options for searching. I don't know if it is possible to customise the find panel (eg. restrict search & replace to a single column). Search the docs for the methods
-usesFindPanel
and-performFindPanelAction:
. -
we could also use the find bar, which is the more modern interface. It has much better documentation. Search docs for
NSTextFinder
. I also don't know if the find bar interface can be customized. -
if neither of the two options allows customisation, we might have to come up with our own interface. We'd need to design a custom view with a view controller in Interface Builder. It could be either something similar to the find bar, or it could be something that opens in a new window.
Once that is done, you should start looking at the Document.m, and implement all the methods that actually do the work. Have a look at the other action methods. It's important to make sure that undo/redo is supported for any actions that change the data.
@Robert-M-Muench Can you please provide a mock up from another modern app that has this feature so we can compare and get closer to a solution?
@fulldecent Well... not a particular one, it's just standard. Just add simple S&R fields in the toolbar would be enough. KISS.
There is no “just standard”. Computers require specific instructions to work. Programmers require specific designs to implement.
If people here would like to see progress on this issue they are welcome to contribute specific designs and begin discussing ehich is best.
Many recent MacOS apps have a drop-down S&R box, like Safari. Matching text in the open window also gets highlighted. I assume this is a standard thing in the OS, though I have no clue about implementing it.