Re: [Pharo-users] Question on Morphic drawOn: method.

2015-02-06 Thread Stephan Eggermont
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

Re: [Pharo-users] Question on Morphic drawOn: method.

2015-02-06 Thread Hilaire
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

Re: [Pharo-users] Question on Morphic drawOn: method.

2015-02-05 Thread Trygve Reenskaug
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

Re: [Pharo-users] Question on Morphic drawOn: method.

2015-02-05 Thread nacho
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: > >

Re: [Pharo-users] Question on Morphic drawOn: method.

2015-02-05 Thread Trygve Reenskaug
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

Re: [Pharo-users] Question on Morphic drawOn: method.

2015-02-05 Thread nacho
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

Re: [Pharo-users] Question on Morphic drawOn: method.

2015-02-05 Thread Trygve Reenskaug
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

Re: [Pharo-users] Question on Morphic drawOn: method.

2015-02-05 Thread kilon alios
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

Re: [Pharo-users] Question on Morphic drawOn: method.

2015-02-05 Thread nacho
@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

Re: [Pharo-users] Question on Morphic drawOn: method.

2015-02-04 Thread Trygve Reenskaug
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

Re: [Pharo-users] Question on Morphic drawOn: method.

2015-02-04 Thread Sean P. DeNigris
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

Re: [Pharo-users] Question on Morphic drawOn: method.

2015-02-04 Thread nacho
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

Re: [Pharo-users] Question on Morphic drawOn: method.

2015-02-04 Thread Sean P. DeNigris
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

Re: [Pharo-users] Question on Morphic drawOn: method.

2015-02-04 Thread kilon alios
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

Re: [Pharo-users] Question on Morphic drawOn: method.

2015-02-04 Thread nacho
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

Re: [Pharo-users] Question on Morphic drawOn: method.

2015-02-04 Thread Hilaire
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

Re: [Pharo-users] Question on Morphic drawOn: method.

2015-02-04 Thread Ricardo Moran
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

[Pharo-users] Question on Morphic drawOn: method.

2015-02-04 Thread nacho
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