Hilaire wrote
>Read the Pharo by example Morphic chapter, it is written for beginner
The chapter is a good introduction. Also read the LaserGame Tutorial.
The problems come after that. What is a good way of distributing
responsibilities? How do I find which Morph already does (nearly)
what I ne
Le 05/02/2015 17:14, nacho a écrit :
> Yes! Point me to those documents and I will love to read them!!!
> thanks in advance
>
Read the Pharo by example Morphic chapter, it is written for beginner
Hilaire
--
Dr. Geo - http://drgeo.eu
iStoa - http://istoa.drgeo.eu
http://pharo.org/
On 05.02.2015 17:14, nacho wrote:
Yes! Point me to those documents and I will love to read them!!!
thanks in advance
*Lic. Ignacio Sniechowski, MBA**
*
*Prosavic SRL*
*
*
*Tel: (011) 4542-6714*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
**
**
*
On Thu, Feb 5, 20
Yes! Point me to those documents and I will love to read them!!!
thanks in advance
*Lic. Ignacio Sniechowski, MBA*
*Prosavic SRL*
*Tel: (011) 4542-6714*
On Thu, Feb 5, 2015 at 1:02 PM, Trygve Reenskaug [via Smalltalk] <
ml-node+s1294792n4804005...@n4.nabble.com> wrote:
>
>
Because your drawOn: method doesn't draw anything and needs help from super.
It seems to me that you need to read more documentation :-)
On 05.02.2015 15:53, nacho wrote:
That work perfectly. What a silly mistake!!!
Of course it should have been position := aPoint.
Now, is it possible write the
That work perfectly. What a silly mistake!!!
Of course it should have been position := aPoint.
Now, is it possible write the drawOn: method without calling super drawOn:
a Canvas?
I don't completely get it why I should call super drawOn: aCanvas
thanks
nacho
*Lic. Ignacio Sniechowski, MBA*
*Prosa
I've tested your code in Squeak and found another bug (I should have
been more careful when I read your code. Shame on me.)
In class Ball you have the methods
position: aPoint
super position: aPoint.
This does not set a value to your position variable in class Ball, but
upload your code to smalltalkhub or github and lets take a look at it.
Sharing your image is also a viable option
On Thu, Feb 5, 2015 at 12:56 PM, nacho <0800na...@gmail.com> wrote:
> @Trygve
> I've checked and it doesn't work. I can't even bring the halo on to delete
> the morph. The debugger k
@Trygve
I've checked and it doesn't work. I can't even bring the halo on to delete
the morph. The debugger keeps popping.
Thanks anyway to all
Nacho
-
Nacho
Smalltalker apprentice.
Buenos Aires, Argentina.
--
View this message in context:
http://forum.world.st/Question-on-Morphic-drawOn-me
I think you left out a super drawOn: aCanvas in your method.
Interesting to hear if this works:
drawOn: aCanvas
aCanvas borderWidth:10; borderColor: Color green.
*super**drawOn: aCanvas.*
The rest should work AFAICS, but it could be simplified.
(I haven't Pharo available so that I can
nacho wrote
> I'm so lost in morphic.
> Trying to understand the logic of it slowly.
> Unfortunately there seems to be little documentation and a lot of what is
> there does not work in Pharo 3 or 4.
I use Pharo By Example for most straightforward Morphic questions. It shows
the nuts-and-bolts ver
Great! Thanks.
It works perfectly in Pharo 3 but not in Pharo 4.
I thought that the drawOn: aCanvas was mandatory.
I'm so lost in morphic.
Trying to understand the logic of it slowly.
Unfortunately there seems to be little documentation and a lot of what is
there does not work in Pharo 3 or 4.
Than
HilaireFernandes wrote
> First you don't need to subclass EllipseMorph...
> 100 to: 50 by: -1 do: [ :x |
> aBall
> height: x;
> bottom: 200 - x.
> World doOneCycle]
Of course you can have the best of both worlds by using Morphic stepping in
your subclass, like:
EllipseMorp
alt+shift+left click should bring on the halo , the claw like icon has a
menu with the debuger as an entry you can trigger to see whats wrong. You
can also inspect the morph too and play around with it, very useful even
when you got no errors.
On Wed, Feb 4, 2015 at 9:33 PM, nacho <0800na...@gmail
Thank you both of you!
I will continue with my Morphic explorations
Nacho
-
Nacho
Smalltalker apprentice.
Buenos Aires, Argentina.
--
View this message in context:
http://forum.world.st/Question-on-Morphic-drawOn-method-tp4803695p4803734.html
Sent from the Pharo Smalltalk Users mailin
Hello Nacho,
It is even simpler as you seems to imagine.
First you don't need to subclass EllipseMorph if all you want is a ball,
then you don't need the position attribute, Morph always knows about
positionning.
Then, the #drawOn: method is to do the drawing, you don't need to
subclass as long as
Hi Nacho,
The red box with two crossing yellow lines indicates that you made a
mistake in the drawOn: method.
Whenever that happens, here is a tip that might help you. If you can't
easily spot your error, you can debug it by evaluating:
aBall drawOn: Display getCanvas.
This will bring up the de
Hi,
I have the following question:
I want to draw a bouncing ball.
First thing I do is create a class:
EllipseMorph subclass: #Ball
instanceVariableNames: 'position'
classVariableNames: ''
category: 'PBE-BouncingBall'
Then an initialization method that mostly do a super i
18 matches
Mail list logo