[squeak-dev] Re: Text Editors

Igor Stasenko siguctua at gmail.com
Mon Aug 3 02:51:20 UTC 2009


2009/8/2 Andreas Raab <andreas.raab at gmx.de>:
> 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?
>
yeah..

> 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
>
ouch.. this is soo easy! Smalltalk rules! :)

> I don't really care. Either way is fine as long as it's one-time use.
>
> Cheers,
>  - Andreas
>
>



-- 
Best regards,
Igor Stasenko AKA sig.



More information about the Squeak-dev mailing list