Main navigation

Further improvements in xattred 1.0b3, the extended attribute editor

I have been working a lot in xattred of late, and have taken the opportunity to smooth some of its remaining rough edges. In particular, this new version 1.0b3 tidies the commands in the File menu, removing the Open command from there, and enhances saving to text files.

Because of the way that xattrs work, and the need for xattred to be able to open any file or folder, using the standard menu-based Open command becomes very messy, and the Open button supports its full features.

You can use the Save and Save as… commands in the File menu to create text summaries of xattrs in the current file or folder. If you Save (or Save as) when one of the listed xattrs is selected, and displayed in the lower text view, then only that xattr will be written out in text form. If no xattr is selected when you use the Save or Save as command, then all the xattrs for that item will be written to the text file.

To accommodate this, I have adjusted the format of the text output to include better separators, and to give the size of each xattr.

Document naming has also been improved.

This new release of xattred is here: xattred10b3
and in Downloads above. I hope that it continues to support El Capitan (untested), Sierra, and High Sierra.

Apart from a few further tidying jobs, the major remaining tasks before final release are the implementation of Undo/Redo, and the Help book. If there are any other features you want included, or changes which you want made, please let me know here.

The document “Introducingxattred1.0b3.pdf” could not be opened. xattred cannot open files in the “PDF document” format.

But it would be kind of cool if that could be used to open anything in xattred. The use case I’d want is to be able to make a Service that lets me just open any file from Finder directly in xattred, but xattred would need to know how to open files as a prerequisite for that.

Thank you.
Yes, you’re quite right – the app should work like that.
Unfortunately, it is a huge task to get it to do so. This is because apps are engineered to open the data forks of files, and to write those data out when saving. xattred has no business with the data fork, and works only with xattrs.
Apple provides a document architecture which, for example, makes it easy to open a document – all the developer has to do is write the code to read the data from the file into the document’s data structures. With xattred, none of that works, as the app doesn’t want the data fork, but needs to read in all the xattrs, which requires completely different system calls. The same goes for saving.
Sadly, Apple doesn’t provide the source code to the NSDocument class, for instance. So you cannot even work out what needs to be replaced. I have spent a long time trying to solve that, and my conclusion is that – to get xattred working in such a ‘normal’ way – it would take many weeks of coding to basically write most of a new application and document framework.
Whenever I have another bright idea for a solution, I go back and try it out. So far every one has failed miserably, but I’ll keep working at it.
I’m sorry – as xattred is the only app which needs to work so differently, I can’t see Apple rewriting its app frameworks to make this any easier.
Howard.

I should also point out that SearchKeyLite is much closer to being able to work as a Service, as it stands. The right code is all in place, and as it performs a much more limited task with xattrs, the amount of code which has to be replaced is much smaller.
Despite following the ‘rules’ for a Service, it still doesn’t work as one, but at least you can drag and drop documents of any type onto it, and it will open them OK.
One day I will get that working properly as a Service. If only the docs were clear enough to enable me to understand why it doesn’t work now!
Howard.