[squeak-dev] Form asSomethingOrOther
Ronald Spengler
ron.spengler at gmail.com
Thu Aug 27 06:26:12 UTC 2009
We have a winner!
Thank you, Colin:)
On Wed, Aug 26, 2009 at 11:18 PM, Colin Putney <cputney at wiresong.ca> wrote:
>
> On 26-Aug-09, at 10:22 PM, Ronald Spengler wrote:
>
> I have a Form (for use as a button) that I would like to serialize in a
>> way that allows me to keep it as text in a method. I would like to do this
>> the simplest way possible, optimizing for speed (not space.) Ideally it
>> would look as much like this as possible:
>>
>> Foo>>someIcon
>> ^ #( ... ) asForm
>>
>> What's the best way to do this?
>>
>
> Create your form, then send #storeString to it. It will answer a Smalltalk
> expression that recreates the form. Then just answer that expression from
> your #someIcon method. OmniBrowser has a few examples of this in the class
> OBMorphicIcons.
>
> Colin
>
>
--
Ron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20090826/7d32f3e5/attachment.htm
More information about the Squeak-dev
mailing list
|