sebastianconcept / poly

Amber demo with polygons and a physics simulator
MIT License
2 stars 1 forks source link

Add ButtonBarWidget class #7

Open hhzl opened 10 years ago

hhzl commented 10 years ago

PolyWidget is a fat class. Factor out the control buttons in a separate class.

hhzl commented 10 years ago

It is not easy to see how the wiring of the GUI is done. Adding the buttons dynamically and then configuring them with a call to an Amber object method.

sebastianconcept commented 10 years ago

Do you think we can ease that with friendly comments in the code?

hhzl commented 10 years ago

OK, found method

renderButtonsOn: html

What I do not see easily where the method createWorld is called.

Poly calls PolyWidget new . Where does createWorld come into action?

hhzl commented 10 years ago

Friendly comments will be helpful.

sebastianconcept commented 10 years ago

commenting...

sebastian

o/

On 22/04/2014, at 16:49, Hannes Hirzel notifications@github.com wrote:

OK, found method

renderButtonsOn: html What I do not see easily where the method createWorld is called.

Poly calls PolyWidget new . Where does createWorld come into action?

— Reply to this email directly or view it on GitHub.

hhzl commented 10 years ago

What clutters the code is that there is an older version of the class embedded with methods like

and maybe more. Correct?

sebastianconcept commented 10 years ago

I've pushed commented code and also cleaned dead code

I think all those are gone now.

When you can check and let me know so I can close this

hhzl commented 10 years ago

Thank you. It is easy to follow now. Thus it may serve as a guide how to integrate paperjs in Amber. This question was recently asked on the ML.

hhzl commented 10 years ago

In particular see http://juerglehni.com/works/scriptographer

hhzl commented 10 years ago

Are the methods in the protocols actions and accessing in the class Poly used at all?