Confusing issue with blocks

J J azreal1977 at hotmail.com
Wed Dec 13 21:26:14 UTC 2006


Thanks Lukas.  I will keep that in mind.  It turns out that one call to 
clone fixed it.

I changed:

	^ aBinaryBlock value: head value: (LazyValue delay: [ tail force inject: 
aValue into: aBinaryBlock ])

to:

	^ aBinaryBlock clone value: head value: (LazyValue delay: [ tail force 
inject: aValue into: aBinaryBlock ])

I had already tried doing:

        cloneBlock := aBinaryBlock clone.

	^ cloneBlock value: head value: (LazyValue delay: [ tail force inject: 
aValue into: cloneBlock ])

But it didn't work.  But anyway, it's working now.  Thanks for the help all.

>From: "Lukas Renggli" <renggli at gmail.com>
>Reply-To: The general-purpose Squeak developers 
>list<squeak-dev at lists.squeakfoundation.org>
>To: "The general-purpose Squeak developers 
>list"<squeak-dev at lists.squeakfoundation.org>
>Subject: Re: Re: Confusing issue with blocks
>Date: Wed, 13 Dec 2006 08:45:15 +0100
>
>>- Squeak would provide some simple way to say "please instantiate these
>>specific blocks as closures" (maybe this one exists?)
>
>Sure, use an image with the new compiler (such as
>http://www.iam.unibe.ch/~denker/temp/NewCompiler.zip). Then either
>change the global settings or implement a method like
>
>LazyWhatsoever class>>compilerClass
>	^ ClosureCompiler
>
>in your classes where you want closures.
>
>Lukas
>
>--
>Lukas Renggli
>http://www.lukas-renggli.ch
>

_________________________________________________________________
WIN up to $10,000 in cash or prizes – enter the Microsoft Office Live 
Sweepstakes http://clk.atdmt.com/MRT/go/aub0050001581mrt/direct/01/




More information about the Squeak-dev mailing list