|
Ankh'nAton |
|
|
|
|
Great, let's try it out with some test cases....
| box p | box := BoxMorph new. box at: 'mouseClickLeft' put: [Browser open]. box setColor: #(0 70 180) asColor. box show. world add: box . world changed. WORKS FINE. However with creating morphic.js points I have troubles. | box p | box := BoxMorph new. box at: 'mouseClickLeft' put: [Browser open]. box setColor: #(0 70 180) asColor. p := window Point new x: 20; y:10; yourself . box setPosition: p. box show. world add: box . world changed. DOES not work. --Hannes On 2/23/12, Tom <[hidden email]> wrote: > Hi! > > try: > http://tcltalk.ath.cx/amber/examples/morphic/ > > Cheers... > |
|
Ankh'nAton |
|
|
For the Point thing, You can do it on my page like...
box setPosition: (20@10) asMorphicPoint. ..., as I extended Amber's Point class with #asMorphicPoint. Did You try that? Cheers... On 23 Feb., 18:05, "H. Hirzel" <[hidden email]> wrote: > Great, let's try it out with some test cases.... > > | box p | > box := BoxMorph new. > box at: 'mouseClickLeft' put: [Browser open]. > box setColor: #(0 70 180) asColor. > box show. > world add: box . > world changed. > > WORKS FINE. > > However with creating morphic.js points I have troubles. > > | box p | > box := BoxMorph new. > box at: 'mouseClickLeft' put: [Browser open]. > box setColor: #(0 70 180) asColor. > p := window Point new > x: 20; > y:10; > yourself . > box setPosition: p. > box show. > world add: box . > world changed. > > DOES not work. > > --Hannes > > On 2/23/12, Tom <[hidden email]> wrote: > > > > > > > > > Hi! > > > try: > > http://tcltalk.ath.cx/amber/examples/morphic/ > > > Cheers... |
|
|
I thought I did, but a retry shows that it works.
http://tcltalk.ath.cx/amber/examples/morphic/ | box p | box := BoxMorph new. box at: 'mouseClickLeft' put: [Browser open]. box setColor: #(0 70 180) asColor. box setPosition: (200@50) asMorphicPoint. box show. world add: box . world changed. Great. --Hannes On 2/23/12, Tom <[hidden email]> wrote: > For the Point thing, You can do it on my page like... > > box setPosition: (20@10) asMorphicPoint. > > ..., as I extended Amber's Point class with #asMorphicPoint. > > Did You try that? > > Cheers... > > > On 23 Feb., 18:05, "H. Hirzel" <[hidden email]> wrote: >> Great, let's try it out with some test cases.... >> >> | box p | >> box := BoxMorph new. >> box at: 'mouseClickLeft' put: [Browser open]. >> box setColor: #(0 70 180) asColor. >> box show. >> world add: box . >> world changed. >> >> WORKS FINE. >> >> However with creating morphic.js points I have troubles. >> >> | box p | >> box := BoxMorph new. >> box at: 'mouseClickLeft' put: [Browser open]. >> box setColor: #(0 70 180) asColor. >> p := window Point new >> x: 20; >> y:10; >> yourself . >> box setPosition: p. >> box show. >> world add: box . >> world changed. >> >> DOES not work. >> >> --Hannes >> >> On 2/23/12, Tom <[hidden email]> wrote: >> >> >> >> >> >> >> >> > Hi! >> >> > try: >> > http://tcltalk.ath.cx/amber/examples/morphic/ >> >> > Cheers... > |
|
Ankh'nAton |
|
|
It's getting better every time ;)
Now, if You like, try... | m | m := ABoxMorph new color: 'red'; "or: #(255 0 0) asColor." position: (100@100); show; yourself. world add: m asMorph. world changed. ...after a fresh reload of my page. Nicolas lead me on the right path to morphic wrapping, when he added 'Message #sendTo:' today. When the tree of wrapper classes is complete with all essential methods in each class then we are able to subclass morphs from morphic.js in Amber's Smalltalk ;) Cheers... |
| Powered by Nabble | See how NAML generates this page |