[Newbies] Re: Beginners Digest, Vol 75, Issue 10

patrick dudjalija patrick.dudjalija at gmail.com
Sun Jul 22 19:37:42 UTC 2012


Dear Tobias,

Thank you for your suggestion about the animation package of Marcel.
I've checked it out, and it seems interesting and promising.

Have a nice day,

Patrick


2012/7/20, beginners-request at lists.squeakfoundation.org
<beginners-request at lists.squeakfoundation.org>:
> Send Beginners mailing list submissions to
> 	beginners at lists.squeakfoundation.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://lists.squeakfoundation.org/mailman/listinfo/beginners
> or, via email, send a message with subject or body 'help' to
> 	beginners-request at lists.squeakfoundation.org
>
> You can reach the person managing the list at
> 	beginners-owner at lists.squeakfoundation.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Beginners digest..."
>
>
> Today's Topics:
>
>    1. Re: Morphic - how to make a submorph not visible outside	his
>       owner (patrick dudjalija)
>    2. Fading out a morph (patrick dudjalija)
>    3. Re: Fading out a morph (Tobias Pape)
>    4. Re: Morphic - how to make a submorph not visible outside	his
>       owner (David Corking)
>    5. About Installer (H. Hirzel)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 19 Jul 2012 15:17:27 +0200
> From: patrick dudjalija <patrick.dudjalija at gmail.com>
> Subject: [Newbies] Re: Morphic - how to make a submorph not visible
> 	outside	his owner
> To: beginners at lists.squeakfoundation.org
> Message-ID:
> 	<CAEMqm6H4RmA+Xmw8RKnHDF6tgHPf6Yt9oWa+8ab3YbCeBCkL6Q at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Dear David,
>
> It's *EXACTLY* what i needed.
> Thank you very much !
>
> By the way, anyone got an idea why if the line "Transcript show: (pos
> asString);cr." is commented out or the Transcript Window is closed, i don't
> get the animation but only the final state of the animation ? (see code
> belows).
>
> Thank you !
>
> |m1 m2|
> m1:=Morph new.
> m1 extent:800 at 600.
> m1 color:Color blue.
> m1 center: Display center.
> m1 openInWorld.
> m1 clipSubmorphs:true.
> m2:=Morph new.
> m2 extent:200 at 200.
> m2 color:Color red.
> m1 addMorph: m2.
> m2 center: m1 center.
> 1 to:200 do:[:el|
> |pos|
> (Duration seconds:0.01) asDelay wait.
> pos:=(m2 position x -5)@(m2 position y).
> ((pos x + m2 width) >= (m1 position x)) ifFalse:[
> pos:=((m1 position x + m1 width)@ m2 position y).
> ].
> "Transcript show: (pos asString);cr."
>  m2 position:pos.
> ].
>
> 2012/7/19 <beginners-request at lists.squeakfoundation.org>
>
>> Send Beginners mailing list submissions to
>>         beginners at lists.squeakfoundation.org
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>>         http://lists.squeakfoundation.org/mailman/listinfo/beginners
>> or, via email, send a message with subject or body 'help' to
>>         beginners-request at lists.squeakfoundation.org
>>
>> You can reach the person managing the list at
>>         beginners-owner at lists.squeakfoundation.org
>>
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of Beginners digest..."
>>
>>
>> Today's Topics:
>>
>>    1. Re: Morphic - how to make a submorph not visible outside  his
>>       owner ? (David Corking)
>>    2. Re: Morphic - how to make a submorph not visible outside  his
>>       owner ? (David Corking)
>>
>>
>> ----------------------------------------------------------------------
>>
>> Message: 1
>> Date: Wed, 18 Jul 2012 15:02:25 +0100
>> From: David Corking <lists at dcorking.com>
>> Subject: Re: [Newbies] Morphic - how to make a submorph not visible
>>         outside his owner ?
>> To: "A friendly place to get answers to even the most basic questions
>>         about   Squeak." <beginners at lists.squeakfoundation.org>
>> Message-ID:
>>         <
>> CAG+Z5Jc8rM_7-toVpRYmhjG2cfXfR10+ivitvFHkm4U4SKbwkQ at mail.gmail.com>
>> Content-Type: text/plain; charset=ISO-8859-1
>>
>> Patrick, Is clipSubmorphs what you want?
>>
>> David
>>
>>
>> ------------------------------
>>
>> Message: 2
>> Date: Wed, 18 Jul 2012 16:23:07 +0100
>> From: David Corking <lists at dcorking.com>
>> Subject: Re: [Newbies] Morphic - how to make a submorph not visible
>>         outside his owner ?
>> To: "A friendly place to get answers to even the most basic questions
>>         about   Squeak." <beginners at lists.squeakfoundation.org>
>> Message-ID:
>>         <CAG+Z5JcYzXFMzeJnQhd63m4RF+=k9uz_V2SMfL=
>> hUVsq5FX50g at mail.gmail.com>
>> Content-Type: text/plain; charset=ISO-8859-1
>>
>> I should be more specific. Try
>>
>> m1 clipSubmorphs: true.
>>
>> Hope that helps. David
>>
>> p.s. I think your do loop pre-empts the Morphic UI loop.
>> Have you read John Maloney's tutorial on the step method?
>>
>> http://stephane.ducasse.free.fr/FreeBooks/CollectiveNBlueBook/morphic.final.pdf
>> In the meantime, you could switch your Transcript hack for this hack :)
>>   m1 refreshWorld.
>>
>>
>> ------------------------------
>>
>> _______________________________________________
>> Beginners mailing list
>> Beginners at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>>
>>
>> End of Beginners Digest, Vol 75, Issue 9
>> ****************************************
>>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://lists.squeakfoundation.org/pipermail/beginners/attachments/20120719/2855ee91/attachment-0001.htm
>
> ------------------------------
>
> Message: 2
> Date: Thu, 19 Jul 2012 15:23:03 +0200
> From: patrick dudjalija <patrick.dudjalija at gmail.com>
> Subject: [Newbies] Fading out a morph
> To: beginners at lists.squeakfoundation.org
> Message-ID:
> 	<CAEMqm6Ht7BeOOTmD2WjAVMNZiogWi8kvkNOgHHGMSORxdeLETw at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hello everyone !
>
> I found a way to fade out a morph via the BitBlt class.
> Problem is with the code line "(Duration seconds:1) asDelay wait."
> When this line is present, i don't see the intermediary states, only the
> final result.
> But i need wait time at each iteration of BitBlt copyBits, precisely to
> visualize the fading out ...
>
> see code below.
>
> Thank you very much for any help ...
>
> Patrick
>
>
> |s|
>
> s:=SketchMorph fromStream: (FileStream
> readOnlyFileNamed:'.\images\LesPetitesBetes\abeille.png').
>
> s openInWorld.
>
> s center:Display center.
>
> 1 to: 10 do: [:el|
>
> (Duration seconds:1) asDelay wait.
>
> (BitBlt
> destForm: s form
> sourceForm: nil
> halftoneForm: ((Color white) alpha:0.2)
> combinationRule:24
> destOrigin:0 at 0
> sourceOrigin:0 at 0
> extent:(s extent)
> clipRect: ((0 at 0) extent: (s extent)) ) copyBits.
>
> ].
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://lists.squeakfoundation.org/pipermail/beginners/attachments/20120719/11a5f0cf/attachment-0001.htm
>
> ------------------------------
>
> Message: 3
> Date: Thu, 19 Jul 2012 15:33:53 +0200
> From: Tobias Pape <Das.Linux at gmx.de>
> Subject: Re: [Newbies] Fading out a morph
> To: "A friendly place to get answers to even the most basic questions
> 	about	Squeak." <beginners at lists.squeakfoundation.org>
> Message-ID: <C72F9F60-9979-4588-9A2A-AC3B75CDFF8E at gmx.de>
> Content-Type: text/plain; charset=iso-8859-1
>
> Am 19.07.2012 um 15:23 schrieb patrick dudjalija:
>
>> Hello everyone !
>>
>> I found a way to fade out a morph via the BitBlt class.
>> Problem is with the code line "(Duration seconds:1) asDelay wait."
>> When this line is present, i don't see the intermediary states, only the
>> final result.
>> But i need wait time at each iteration of BitBlt copyBits, precisely to
>> visualize the fading out ...
>>
>> see code below.
>
> this should probably done in the stepping of the morph.
>
>>
>> Thank you very much for any help ...
>
>>
>> Patrick
>>
>>
>> |s|
>> s:=SketchMorph fromStream: (FileStream
>> readOnlyFileNamed:'.\images\LesPetitesBetes\abeille.png').
>>
>> s openInWorld.
>>
>> s center:Display center.
>>
>> 1 to: 10 do: [:el|
>>
>> (Duration seconds:1) asDelay wait.
>>
>> (BitBlt
>> destForm: s form
>> sourceForm: nil
>> halftoneForm: ((Color white) alpha:0.2)
>> combinationRule:24
>> destOrigin:0 at 0
>> sourceOrigin:0 at 0
>> extent:(s extent)
>> clipRect: ((0 at 0) extent: (s extent)) ) copyBits.
>>
>> ].
>
> You probably want to check out the animations Package of
> Marcel:
>
> https://www.hpi.uni-potsdam.de/hirschfeld/trac/SqueakCommunityProjects/wiki/animations
>
>
> Best
> 	-Tobias
>
> ------------------------------
>
> Message: 4
> Date: Thu, 19 Jul 2012 15:17:09 +0100
> From: David Corking <lists at dcorking.com>
> Subject: [Newbies] Re: Morphic - how to make a submorph not visible
> 	outside	his owner
> To: "A friendly place to get answers to even the most basic questions
> 	about	Squeak." <Beginners at lists.squeakfoundation.org>
> Message-ID:
> 	<CAG+Z5JeUBppVQ9Daii3cXJtBRzc2Fmnch5erfPSrLpOk0sgWQw at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> patrick dudjalija wrote:
>
>> It's *EXACTLY* what i needed.
>
> You are welcome.
>
>> By the way, anyone got an idea why if the line "Transcript show: (pos
>> asString);cr." is commented out or the Transcript Window is closed, i
>> don't
>> get the animation but only the final state of the animation ?
>
> You blocked Morphic's UI loop, so that your morph doesn't update the
> screen.
>
> As Tobias said, try to use Morphic's built-in hooks to step animation,
> as shown here:
>
> http://stephane.ducasse.free.fr/FreeBooks/CollectiveNBlueBook/morphic.final.pdf
>
> Once I understood how timing works, I found step easier than
> iteration. It is more fun too, as you can co-ordinate simultaneous
> animations.
>
> However the following quick ugly hack works.  I send a refreshWorld
> message to m1 after each iteration. The UI loop is still blocked,
> which is probably not what you want, but you can see the animation
> without a transcript.
>
> |m1 m2|
>
> m1:=Morph new.
> m1 extent:800 at 600.
> m1 color:Color blue.
> m1 center: Display center.
> m1 clipSubmorphs: true.
> m1 openInWorld.
>
> m2:=Morph new.
> m2 extent:200 at 200.
> m2 color:Color red.
>
> m1 addMorph: m2.
> m2 center: m1 center.
>
> 1 to:200 do:[:el|
> 	|pos|
> 	(Duration seconds:0.01) asDelay wait.
> 	pos:=(m2 position x -5)@(m2 position y).
> 	((pos x + m2 width) >= (m1 position x)) ifFalse:[
> 		pos:=((m1 position x + m1 width)@ m2 position y).
> 		].
> 	m2 position:pos.	
> 	m1 refreshWorld.
> 	].
>
> Have fun!
>
>
> ------------------------------
>
> Message: 5
> Date: Fri, 20 Jul 2012 08:48:48 +0100
> From: "H. Hirzel" <hannes.hirzel at gmail.com>
> Subject: [Newbies] About Installer
> To: beginners at lists.squeakfoundation.org
> Message-ID:
> 	<CAGQxfVjj8ZJwVpKSF=9=8aakrNhQ1yHcK88HCxX8GH1vGe7MxA at mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
>
> Hello
>
> The class level documentation for the Installer class refers to
>
>    http://installer.pbwiki.com/Installer
>
> That page says
>
> "Installer provides a simple Domain Specific Language for installing
> packages from Monticello and SqueakMap of various version."
>
> >From the code I see that there is an instance variable 'noiseLevel'.
>
> And there is as well a class method protocol called 'logging' but it
> only contains one method
>
> log: aString
>
> 	Transcript show: aString; cr.
>
>
> My questions:
> 1) What is the Installer DSL expression for raising the noiseLevel
> 2) I assume the log  goes to Transcript. Is there another option?
>
>
> Thank you for the answers in advance
>
> Hannes
>
>
> ------------------------------
>
> _______________________________________________
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>
>
> End of Beginners Digest, Vol 75, Issue 10
> *****************************************
>


More information about the Beginners mailing list