Re: [Newbies] Float variableWordSubclass

2012-01-05 Thread Ben Coman

Levente Uzonyi wrote:

On Wed, 4 Jan 2012, Ben Coman wrote:


When I define...
  Float subclass: MyPrefixFloat


I guess you meat Float subclass: #MyPrefixFloat .



why does it get changed to...
  Float variableWordSubclass: #MyPrefixFloat


Float is already a variableWordSubclass, so its subclasses must also 
be variableWordSubclasses, otherwise the indexable slots would be lost.




and is that just what the Epsilon symbol next to the class is?


What Epsilon symbol?


Epsilon - the letter of the Greek alphabet used in maths.
But doh!  I should have said summation symbol
http://en.wikipedia.org/wiki/Summation
___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners


[Newbies] Is there an easy way to implement an animation loop?

2012-01-05 Thread Jan Teske

Hi there,

I try to implement a blocking animation so that the process waits for 
the animation to be terminated before going ahead. This animation should 
lower the extent of a Morph in 20 iterations so that it looks like it 
would shrink.


I tried to accomplish that in a '1 to: 20 do:' loop but the Morph is not 
updated during the iterations. I tried 'morph changed' but that doesn't 
work either. It does work, however, if I fork the animation loop. But 
than I have an extra process an need Semaphores to wait for its 
execution. That's not as simple as it could be.


Is there any better way than fork and Semaphore? Maybe some force redraw 
method I have overlooked?


Thanks in advance!
___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners


Re: [Newbies] Changing the extent of an ImageMorph

2012-01-05 Thread Bert Freudenberg

On 04.01.2012, at 16:44, Jan Teske wrote:

 Hey,
 
 I'm currently developing a small game with Squeak. Part of it is a bunch of 
 menus which should have background images. Therefore I have realized them as 
 ImageMorphs with the respective images.
 Now, there are menus which sizes are determined dynamically during the 
 runtime of the game. That means I have to change the size of the menus. Since 
 I cannot do this by manipulating 'menu extent: ...' directly, the only way I 
 found until now is to manipulate the image form 'menu image: menu image 
 scaledToSize: ...'. That works pretty well except for one thing: I cannot 
 change the aspect ration of the original image with scaledToSize:. Since I do 
 not know the extends of my menus before the game starts, I cannot say 
 anything about the needed image ratio. Since my menus should be as applicable 
 as possible I need to be able to resize also in a way which destroys the 
 original scales.
 
 Is there any easy workaround for my problem or a recommended way for creating 
 resizable Morphs with background images?


Wouldn't it be simplest to just use a regular MenuMorph and give it a 
BitmapFillStyle?

MenuMorph example
fillStyle: (BitmapFillStyle fromForm: ScriptingSystem 
squeakyMouseForm);
openCenteredInWorld 

- Bert -


___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners


Re: [Newbies] Is there an easy way to implement an animation loop?

2012-01-05 Thread karl ramberg
Hi
In morphich you should use the step method.

Just add a step method to the morph and start the stepping when you want
the animation to start.
I think you must add a self changed or a self layoutChanged at the end of
the step method to update the morph.

It's a little more difficult to block all other morphs from update thou.
But if they run animation, you can stop their stepping and start it again
when your animation is done.

Morphic runs in a single process and using other processes will
not necessarily give trouble.

You set the desired time between steps with method stepTime and return
the millisecond time you would like.

Karl

On Thu, Jan 5, 2012 at 2:15 PM, Jan Teske 
jan.te...@student.hpi.uni-potsdam.de wrote:

 Hi there,

 I try to implement a blocking animation so that the process waits for the
 animation to be terminated before going ahead. This animation should lower
 the extent of a Morph in 20 iterations so that it looks like it would
 shrink.

 I tried to accomplish that in a '1 to: 20 do:' loop but the Morph is not
 updated during the iterations. I tried 'morph changed' but that doesn't
 work either. It does work, however, if I fork the animation loop. But than
 I have an extra process an need Semaphores to wait for its execution.
 That's not as simple as it could be.

 Is there any better way than fork and Semaphore? Maybe some force redraw
 method I have overlooked?

 Thanks in advance!
 __**_
 Beginners mailing list
 Beginners@lists.**squeakfoundation.orgBeginners@lists.squeakfoundation.org
 http://lists.squeakfoundation.**org/mailman/listinfo/beginnershttp://lists.squeakfoundation.org/mailman/listinfo/beginners

___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners


Re: [Newbies] Is there an easy way to implement an animation loop?

2012-01-05 Thread karl ramberg
On Thu, Jan 5, 2012 at 6:00 PM, karl ramberg karlramb...@gmail.com wrote:

 Hi
 In morphich you should use the step method.

 Just add a step method to the morph and start the stepping when you want
 the animation to start.
 I think you must add a self changed or a self layoutChanged at the end of
 the step method to update the morph.

 It's a little more difficult to block all other morphs from update thou.
 But if they run animation, you can stop their stepping and start it again
 when your animation is done.

 Morphic runs in a single process and using other processes will
 not necessarily give trouble.


 Morphic runs in a single process and using other processes will give you
trouble.


 You set the desired time between steps with method stepTime and return
 the millisecond time you would like.

 Karl


 On Thu, Jan 5, 2012 at 2:15 PM, Jan Teske 
 jan.te...@student.hpi.uni-potsdam.de wrote:

 Hi there,

 I try to implement a blocking animation so that the process waits for the
 animation to be terminated before going ahead. This animation should lower
 the extent of a Morph in 20 iterations so that it looks like it would
 shrink.

 I tried to accomplish that in a '1 to: 20 do:' loop but the Morph is not
 updated during the iterations. I tried 'morph changed' but that doesn't
 work either. It does work, however, if I fork the animation loop. But than
 I have an extra process an need Semaphores to wait for its execution.
 That's not as simple as it could be.

 Is there any better way than fork and Semaphore? Maybe some force redraw
 method I have overlooked?

 Thanks in advance!
 __**_
 Beginners mailing list
 Beginners@lists.**squeakfoundation.orgBeginners@lists.squeakfoundation.org
 http://lists.squeakfoundation.**org/mailman/listinfo/beginnershttp://lists.squeakfoundation.org/mailman/listinfo/beginners



___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners


[Newbies] Re: Is there an easy way to implement an animation loop?

2012-01-05 Thread Sean P. DeNigris

Karl Ramberg wrote
 
 use the step method.
 

Yes, and if you had to communicate with Morphic from another process, use
#addDeferredUIMessage:
  m := Morph new openInWorld.
  m center: 100@100.
  [ 100 timesRepeat: [ 
WorldState addDeferredUIMessage: [ m position: m position + 1 ].
(Delay forMilliseconds: 100) wait ] ] fork

--
View this message in context: 
http://forum.world.st/Is-there-an-easy-way-to-implement-an-animation-loop-tp4265423p4266739.html
Sent from the Squeak - Beginners mailing list archive at Nabble.com.
___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners


RE: [Newbies] Is there an easy way to implement an animation loop?

2012-01-05 Thread Teske, Jan
Thank you, I will try it with stepping. Can you tell my what I have to do to 
prevent stepping as soon as the Morph is created? A 'morph stopStepping' in the 
initialize method is not helping since there is no world for the morph at this 
time. What shall I do instead?

Thanks!

From: beginners-boun...@lists.squeakfoundation.org 
[beginners-boun...@lists.squeakfoundation.org] On Behalf Of karl ramberg 
[karlramb...@gmail.com]
Sent: Thursday, January 05, 2012 6:00 PM
To: A friendly place to get answers to even the most basic questions about  
Squeak.
Subject: Re: [Newbies] Is there an easy way to implement an animation loop?

Hi
In morphich you should use the step method.

Just add a step method to the morph and start the stepping when you want the 
animation to start.
I think you must add a self changed or a self layoutChanged at the end of the 
step method to update the morph.

It's a little more difficult to block all other morphs from update thou.
But if they run animation, you can stop their stepping and start it again when 
your animation is done.

Morphic runs in a single process and using other processes will not necessarily 
give trouble.

You set the desired time between steps with method stepTime and return the 
millisecond time you would like.

Karl

On Thu, Jan 5, 2012 at 2:15 PM, Jan Teske 
jan.te...@student.hpi.uni-potsdam.demailto:jan.te...@student.hpi.uni-potsdam.de
 wrote:
Hi there,

I try to implement a blocking animation so that the process waits for the 
animation to be terminated before going ahead. This animation should lower the 
extent of a Morph in 20 iterations so that it looks like it would shrink.

I tried to accomplish that in a '1 to: 20 do:' loop but the Morph is not 
updated during the iterations. I tried 'morph changed' but that doesn't work 
either. It does work, however, if I fork the animation loop. But than I have an 
extra process an need Semaphores to wait for its execution. That's not as 
simple as it could be.

Is there any better way than fork and Semaphore? Maybe some force redraw method 
I have overlooked?

Thanks in advance!
___
Beginners mailing list
Beginners@lists.squeakfoundation.orgmailto:Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners

___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners


Re: [Newbies] Is there an easy way to implement an animation loop?

2012-01-05 Thread karl ramberg
Ugh, that is right.
Stepping starts right away for a new morph.
Since you want stepping only at certain times you should use
startSteppingSelector:  and stopSteppingSelector: (and not call that
selector/method #step.)

Karl

On Thu, Jan 5, 2012 at 9:00 PM, Teske, Jan 
jan.te...@student.hpi.uni-potsdam.de wrote:

 Thank you, I will try it with stepping. Can you tell my what I have to do
 to prevent stepping as soon as the Morph is created? A 'morph stopStepping'
 in the initialize method is not helping since there is no world for the
 morph at this time. What shall I do instead?

 Thanks!
 
 From: beginners-boun...@lists.squeakfoundation.org [
 beginners-boun...@lists.squeakfoundation.org] On Behalf Of karl ramberg [
 karlramb...@gmail.com]
 Sent: Thursday, January 05, 2012 6:00 PM
 To: A friendly place to get answers to even the most basic questions about
  Squeak.
 Subject: Re: [Newbies] Is there an easy way to implement an animation loop?

 Hi
 In morphich you should use the step method.

 Just add a step method to the morph and start the stepping when you want
 the animation to start.
 I think you must add a self changed or a self layoutChanged at the end of
 the step method to update the morph.

 It's a little more difficult to block all other morphs from update thou.
 But if they run animation, you can stop their stepping and start it again
 when your animation is done.

 Morphic runs in a single process and using other processes will not
 necessarily give trouble.

 You set the desired time between steps with method stepTime and return the
 millisecond time you would like.

 Karl

 On Thu, Jan 5, 2012 at 2:15 PM, Jan Teske 
 jan.te...@student.hpi.uni-potsdam.demailto:
 jan.te...@student.hpi.uni-potsdam.de wrote:
 Hi there,

 I try to implement a blocking animation so that the process waits for the
 animation to be terminated before going ahead. This animation should lower
 the extent of a Morph in 20 iterations so that it looks like it would
 shrink.

 I tried to accomplish that in a '1 to: 20 do:' loop but the Morph is not
 updated during the iterations. I tried 'morph changed' but that doesn't
 work either. It does work, however, if I fork the animation loop. But than
 I have an extra process an need Semaphores to wait for its execution.
 That's not as simple as it could be.

 Is there any better way than fork and Semaphore? Maybe some force redraw
 method I have overlooked?

 Thanks in advance!
 ___
 Beginners mailing list
 Beginners@lists.squeakfoundation.orgmailto:
 Beginners@lists.squeakfoundation.org
 http://lists.squeakfoundation.org/mailman/listinfo/beginners

 ___
 Beginners mailing list
 Beginners@lists.squeakfoundation.org
 http://lists.squeakfoundation.org/mailman/listinfo/beginners

___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners


[Newbies] OpenGL integerated wtih Squeak IDE

2012-01-05 Thread Lawson English
This is a very poor attempt to do what Matt Fulmer did with OpenCobalt: 
integrate overlapping Morphic windows with OpenGL.


The only advantage is that it doesn't require OpenCobalt.

https://www.youtube.com/watch?v=Ctm-Q39nd-k

The entire World is being rendered onto an OpenGL texture which is 
updated with every tick. With the proper scaling , the destop could be 
repositioned along the z access at any point within the fustrum and 
still keep the default mouse handling. Add mouse handling from OpenGL 
itself, and you can have 2D widgets projected onto 3D objects, not to 
mention  3D widgets fully integrated with the Squeak desktop.


Time to revive/revitalize Balloon3D, perhaps? Whatever happened to 3D 
Morphic?


There's obviously a great deal of room for optimization, and of course, 
the sky is the limit for what could be done in terms of lighting, 
materials, etc.


Using more modern APIs of OpenGL (I'm using immediate mode! (!) and only 
stuff from the first 6 NeHe tutorials) one could have an awful lot of 
interesting stuff going on.


Lawson
___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners