Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Read-only README from TextEdit?

Read-only README from TextEdit?
Thread Tools
Dedicated MacNNer
Join Date: Nov 2000
Status: Offline
Reply With Quote
Oct 25, 2001, 09:27 PM
 
Hello ...

[This may be more of a "Usage and Support" forum topic, but developers may have a greater interest and insight.]

Is there any way to make a TextEdit file read-only? I don't want users of my apps to have the opportunity to delete parts of my READMEs and other accompanying files. (And I don't like some of the ways PDF formats things.)

A number of shareware apps I've downloaded recently (even from some big league players) come with vulnerable TextEdit READMEs, which leads me to believe that it's not possible to make these things read-only.

Is this simply not considered a major concern?


Thanks and regards,

DayLateDon
     
Forum Regular
Join Date: Aug 2001
Location: Vienna, Austria
Status: Offline
Reply With Quote
Oct 26, 2001, 06:11 AM
 
You can't make them r/o as in SimpleText (like unable to type anything into it). However, you can prevent overwriting the file by setting its permissions to 0444.

Maybe you should consider using PDF for distributing your documentation.
     
Senior User
Join Date: Nov 2000
Status: Offline
Reply With Quote
Oct 27, 2001, 02:42 AM
 
I know it's not exactly what you were thinking but maybe clippings would work? Not as pretty but they are r/o.
     
Senior User
Join Date: Jul 2001
Location: Copenhagen, Denmark
Status: Offline
Reply With Quote
Oct 28, 2001, 06:13 AM
 
What exactly dont you like with PDF formatting?

Whent using the built in print to pdf via preview in osx, it looks exactly like it did in textedit
     
Clinically Insane
Join Date: Nov 1999
Status: Offline
Reply With Quote
Oct 28, 2001, 01:32 PM
 
PDF does bloat the file size rather significantly, though. This doesn't necessarily have as much to do with PDF as with Apple's implementation thereof. But I digress.

You can st the permissions to 444; this will kep them from saving any changes they make. You could also lock the file, but this will piss off users when they try to delete the thing.

Mind you, this isn't all that effective, but it's as effective as "ttro" was in OS9, that is, effective only to someone who doesn't have ResEdit or one of the half-billion type changers out there.

In the end, there are three options. One, bite the bullet and use PDF. Two, save it as a giant PNG image, thereby bloating yur download size to a truly hideous degree. Three, put your Readme on a Web site, and include a bookmark to that place instead of the Readme itself. Four, Just Deal With It. Personally, I recommend the third or fourth options (it's just a readme, after all).

Oh, and clippings-as-read-only is about as secure as ttro-as-read-only. In other words, not very.
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
     
Dedicated MacNNer
Join Date: Nov 2000
Status: Offline
Reply With Quote
Oct 29, 2001, 05:13 PM
 
Hello ...

Thanks for the replies.


I suppose one extra alternative is to supply the README as HTML. (It's inelegant to have to supply a conspicuous folder for images, and it seems such a waste to have to fire up a bulky web browser. But I guess this hasn't stopped other developers, and there are benefits for adding links to sites.)


It's a real shame TextEdit doesn't have a read-only file type. SimpleText was great for stuff like READMEs: small docs read by a small app. (The fact that 'ttro's could be _made_ editable isn't a problem for me. I just want to prevent accidental changes.)


Regards,

DayLateDon
     
Dedicated MacNNer
Join Date: Jun 2000
Location: Dundas, Ontario, Canada
Status: Offline
Reply With Quote
Oct 29, 2001, 06:44 PM
 
No matter what you do someone will always be able to change a readme. If it comes down to it, they could just replace the one you distribute with a new one that is entirely different. I will tell you what I like about the listed ideas and offer a few others.

Already mentioined:
-clipping: if you are only using plain text then I guess it is ok but I don't trust them.
-permissions: probably a good and simple idea but I think that there are some operations which change permissions (I am not sure about that, though). If anyone wanted to tamper with it they still could but it would protect you from accidental modifications.
-web site: this is a good idea and could be integrated into the OS X help viewer (I think, I am meaning to experiment with this) but it depends on the user being online (probably a good bet) and depends on your server not going down (not a real risk).
-PDF: If you are only using plain text it would be a ridiculous waste of space and PDFs don't respond as quickly as text on older machines (however this works very well if you have a complicated readme).
-deal with it: I like this one the best but see below for an additional idea.

My ideas:
-integrate the readme with the program bundle: This would prevent normal accesses to the file (maybe an alias or sym-link would work, though) but would hide it from even some of the people that wanted to mess with it.
-use a read-only format for distribution: This is what I do and what most OS X developers do. It prevents all forms of tampering and can be pretty clean (look at OmniWeb or Snapz Pro X that really make this idea attractive). Most developers use an ADC compressed disk image which is read-only and compressed.

Hope that is beneficial,
Jeff.
Spectral Class
"Shedding Light on Innovation"
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:53 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2