[aida] Picture as String

nico petton.nicolas at gmail.com
Fri Feb 13 16:50:26 CET 2009


Hi,

Why don't you just use SpFilename>>contentsAsMethod?

Le vendredi 13 février 2009 à 11:26 +0100, che a écrit :
> Thanks Janko,
> 
> but what really helps is this.
> 
> Make this Methode under class String.
> 
> contentsAsMethod: path
>      "return a body of method with a literal array with contents
>       of that string"
> 
>      | input output |
>      input := FileStream read: path text: false.
>      output := WriteStream with: String new.
>      output nextPutAll: '^#['.
>      [input atEnd] whileFalse:
>              [output
>                  nextPutAll: input next asInteger asString;
>                  nextPut: $ ].
>      output nextPutAll: ']'.
>      ^output contents
> 
> 
> Then let it display in your workspace:
> 
> String new contentsAsMethod: 'c:\123\picture.jpg'
> 
> 
> 
> _______________________________________________
> Aida mailing list
> Aida at aidaweb.si
> http://lists.aidaweb.si/mailman/listinfo/aida
-------------- section suivante --------------
Une pi�ce jointe non texte a �t� nettoy�e...
Nom: non disponible
Type: application/pgp-signature
Taille: 197 octets
Desc: Ceci est une partie de message
 =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=
Url: http://lists.aidaweb.si/pipermail/aida/attachments/20090213/6fb1eb42/attachment.sig 


More information about the Aida mailing list