Re: is this string styled?
Re: is this string styled?
- Subject: Re: is this string styled?
- From: Matt Neuburg <email@hidden>
- Date: Mon, 09 Jan 2006 10:31:55 -0800
- Thread-topic: is this string styled?
On Sun, 8 Jan 2006 01:02:35 -0800, Kevin Ballard <email@hidden> said:
>I'm wondering at the purpose behind this. Is it really worth all the
>trouble for this? A simple attributed string (one with just default
>attributes) isn't much more space than the string itself.
Not so. Try it yourself. You can use the Core Data Stickies example project
as a test bed. A sticky that reads "This is a test.", which is 15
characters, takes 256 characters in the resulting xml file. Now scale that
up. My app typically stores, let's say, 5MB of little text snippets like
that. If I can prevent the xml file from ballooning to something on the
order of 100MB, I should do so.
Now, to be sure, I may not be able to do so. But surely you must admit that
it is in any case a reasonable design goal. Or perhaps you don't admit that?
Perhaps you have unlimited storage space, and you like to imagine that
everyone else does too, and that whoever doesn't is not worth considering as
human. But I come from an age when computer resources of time and space were
at a premium, and it was regarded as desirable to save storage space where
possible; and I happen think it is a form of politeness and respect to one's
users to continue this practice. And in my experience, a user who finds that
an application's files seem disproportionately large will balk at using that
application (indeed, I myself react in just that way).
In any case I don't see why I have to describe and defend larger design
goals merely in order to pose a simple technical question. Either I can or I
can't learn whether an attributed string has the "default attributes", so
that I can substitute a pure NSString for it. Perhaps I'll fail, but
questioning the bona fides of my purposes, and implicitly advising me not
even to try, is not on point.
m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide
<http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden