tom95 / Pheno

A morphic-based UI framework with a lot of Bootstrap-like widgets.
MIT License
7 stars 2 forks source link

Infinite loop in changed/update #55

Closed codeZeilen closed 5 years ago

codeZeilen commented 5 years ago

This occurred when loading the Morphic Tutorial project together with a Pheno project.

After a call to #openAsTool we ended up in Morph>>#addedMorph: (see below) during which setting the parent of a styleContext seems to trigger an infinite loop between changed and update calls.

Morph>>#addedMorph: aMorph

    aMorph styleContext parent: self styleContext.

    self updateHierarchyStyleState
tom95 commented 5 years ago

Could you explain the intent of this method's last line?

MotuPlayground>>#initialize

    super initialize.
    self frameFractions: (0@0 rect: 1@1).
    self setUpBackground.
    super addMorph: Project currentWorld

If removed, there's no more problems (and the first two lectures worked fine)

codeZeilen commented 5 years ago

Wat. That explains a lot.

Sorry for not seeing this...