[squeak-dev] Roassal3 question for the morphic pros to get majority of Roassal3 examples working properly. How to center a RSBalloonMorph in the world?

gettimothy gettimothy at zoho.com
Tue Oct 27 12:20:35 UTC 2020


Hi Folks,



TL;DR;



How do I get a RSBalloonMorph to open up inside the extents of The World?  If we fix this, then the majority of Roassal3 examples are working examples.







For Roassal3



MCHttpRepository

    location: 'http://www.squeaksource.com/Roassal3'

    user: ''

    password: ''






 I have a class named RSExampleDoits  which has class side methods that allow easy access to the various examples a healthy majority of which are "semi-working".

For example:

rsBasicAnimationExamples



"working"



"semi working"

"the viewport for these is off-World on open."

RSBasicAnimationExamples new  example01Basic  open.

RSBasicAnimationExamples new example02Sequential   open.

RSBasicAnimationExamples new  example03Ramp  open.

RSBasicAnimationExamples new  example05LoopEvent  open.

RSBasicAnimationExamples new   example06Parallel open.





"not working"

RSBasicAnimationExamples new  example04DashAnimation  open.

RSBasicAnimationExamples new example07CornerRadius   open.



The basic problem is that the example shows up mostly off-screen in the World off to the right and must be pulled in by the mouse to see it.



the 'open' and 'createMorph' send are to RSCanvas



ProtoObject #()

      Object #()

            RSObject #()

                  RSObjectWithProperty #('announcer' 'properties')

                        RSCanvas #('shapes' 'fixedShapes' 'camera' 'animations' 'extent' 'color' 'morph' 'clearBackground' 'showRectangles' 'nodes' 'edges')

open

| window |

self createMorph.

window := morph openInWindow.

window extent: 500 at 500.

morph privateOwner: window.

^ window



createMorph


"Create a Morph that contains myself."

Smalltalk at: #AthensCanvas

ifPresent: [morph := RSAthensMorph new renderer: RSAthensRenderer new; yourself]

ifAbsent: [morph := RSBalloonMorph new renderer: RSBalloonRenderer new; yourself].     <<---THIS IS CALLED.



morph canvas: self.

^ morph










your insights are much appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20201027/6e5d13a2/attachment.html>


More information about the Squeak-dev mailing list