TableTool icon indicating copy to clipboard operation
TableTool copied to clipboard

Search & Replace?

Open Robert-M-Muench opened this issue 8 years ago • 7 comments

Seems, S&R is not supported. Any chance it will be added? A S&R limited to one column would be nice as well.

Robert-M-Muench avatar Jan 19 '17 13:01 Robert-M-Muench

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.

jakob avatar Jan 19 '17 16:01 jakob

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.

Robert-M-Muench avatar Jan 20 '17 15:01 Robert-M-Muench

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.

jakob avatar Jan 26 '17 12:01 jakob

@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 avatar Jul 05 '18 20:07 fulldecent

@fulldecent Well... not a particular one, it's just standard. Just add simple S&R fields in the toolbar would be enough. KISS.

Robert-M-Muench avatar Aug 03 '18 17:08 Robert-M-Muench

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.

fulldecent avatar Aug 04 '18 19:08 fulldecent

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. screenshot 2018-08-05 11 46 19

Jmuccigr avatar Aug 05 '18 18:08 Jmuccigr