oh wait, apparently i am wrong..
now i even more confused, why my morph fails to compute bounds at the
beginning :)


On 23 October 2013 01:07, Igor Stasenko <[email protected]> wrote:

> I got quite confused, why i got error in strange place,
> the culprit is this one:
>
>
> computeFullBounds
>     [ self doLayoutIn: self layoutBounds ]
>         on: Error
>         do: [ :ex |
>             "This should do it unless you don't screw up the bounds"
>             fullBounds := bounds.
>             ex pass ]
>
> used by this:
>
> fullBounds
>     "Return the bounding box of the receiver and all its children.
> Recompute the layout if necessary."
>
>     fullBounds ifNotNil: [ ^ fullBounds ].    "Errors at this point can be
> critical so make sure we catch 'em all right"
>     self computeFullBounds.    "This should do it unless you don't screw
> up the bounds"
>     ^ fullBounds
>
> So, if error happens, it leaves fullBounds==nil and as result,
> any code which follows, tries to do something with that nil..
> Sure thing it is much more fun figuring out why your morph is broken
> and where, when such nasty code hides errors.
>
> --
> Best regards,
> Igor Stasenko.
>



-- 
Best regards,
Igor Stasenko.

Reply via email to