[squeak-dev] Re: Text Editors
Andreas Raab
andreas.raab at gmx.de
Sun Aug 2 20:04:30 UTC 2009
Igor Stasenko wrote:
> Btw, about such overhead.. Recently i'm also added a data blob in a method.
> And i thought, that it would be cool to not persist the data as a
> code, but instead
> put it into the comment.
> So, a generic method , carrying a data blob could be just:
>
> someData
> "iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAAnklEQVR4XuXBMQEAAADCoPVP
> bQsfIJ/P5/P5fD6fz+fz+Xw+n8/n8/l8Pp/P5/P5fD6fz+fz+Xw+n8/n8/l8Pp/P5/P5fD6f
> z+fz+Xw+n8/n8/l8Pp/P5/P5fD6fz+fz+Xw+n8/n8/l8Pp/P5/P5fD6fz+fz+Xw+n8/n8/l8
> Pp/P5/P5fD6fz+fz+Xw+n8/n8/l8Pp/P5/P5fD6fz3c1nKQAAZiW0oUAAAAASUVORK5CYII=
> "
>
> in this way given blob is not part of an image, it is a part of source files.
> And, by having a method source, it is easy to read a data from it.
> How do you like the idea?
You mean like this?
blankForm
"iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAAnklEQVR4XuXBMQEAAADCoPVP
bQsfIJ/P5/P5fD6fz+fz+Xw+n8/n8/l8Pp/P5/P5fD6fz+fz+Xw+n8/n8/l8Pp/P5/P5fD6f
z+fz+Xw+n8/n8/l8Pp/P5/P5fD6fz+fz+Xw+n8/n8/l8Pp/P5/P5fD6fz+fz+Xw+n8/n8/l8
Pp/P5/P5fD6fz+fz+Xw+n8/n8/l8Pp/P5/P5fD6fz3c1nKQAAZiW0oUAAAAASUVORK5CYII="
^Form fromBinaryStream: (self class firstPrecodeCommentFor: thisContext
method selector) base64Decoded asByteArray readStream
I don't really care. Either way is fine as long as it's one-time use.
Cheers,
- Andreas
More information about the Squeak-dev
mailing list
|