How do .textClipping work files?

bighairydog

tail-wagging member
Aah, back to MacOSX.com after a year away - who else could answer this one?

Not a stupid newbie question this one - .textClippings: what, are they? They don't appear to be like normal files.

Try this - create one on your desktop by dragging text from Safari, and open it in a text editor like BBEdit and it fails. Open in Pico (via the terminal), and nothing's there! Yet the file info shows it has substantial size.

I have not yet managed to copy text from one either, or open one in any app other than the finder.

What are these mysterious objects, and how do they work?

This thread says you can copy and paste them. Anyone had any success doind that

Not that this matters, I'm just curious...

Bernie :eek:)
 
They're just regular text clippings. Double click their icon in the Finder to view their contents. You can copy 'em and paste 'em into other apps or drag-and-drop 'em, but editing them is, for whatever reason, not possible.

There are also picture clippings, URL clippings, and I think clippings of some other types of data.
 
How bizarre...

Well that answers my question about how to do anything with them (thanks), but does anyone know how they work on a filesystem level?

It just seems bizarre that they appear to be blank files (i.e. when you open them in a text editor there's nothing there), so I'm guessing MacOS replaces the file with styled text as you drag it into a file.

The plot thickens - in the terminal, move to the same dir as the .textClipping and type

ls -l -F

and .textclipping files are displayed as having zero size (like SymLinks and directories) but are not marked as SymLinks and you can't cd into them. So where is the data stored? Anybody curious?

Note that this is solely to satisfy my nerdy curiosity...

Bernie :eek:)
 
I'd imagine the oh-so-archaic resource fork. I think to see what's in the resource fork, you've got to use ResEdit, which may or may not run in Classic.

Though perhaps by now there is an OS X app to view resource forks? Anybody?
 
ResEdit works in Classic, I open it up all the time (still). And yeah, the text stuff in textClippings are stored in the resource fork.

BTW, there is an app that will edit a textClipping directly, clipEdit X.
 
Not really, Toast. There are still resource forks with OS X apps - sort of. The resource forks are converted into a text file (basically, the resource part is swapped into the data part). You'll see those as .rsrc files laying around. Admittedly, it's Carbon apps that are using these, but it seems that Carbon apps are gonna be around for a while yet.

That's why I still have ResEdit around. There's still stuff you can mess with in the system if you want to. You just have to find something that will swap the resource and data forks to work with them.
 
Back
Top