Hi Fernando,

Sure we can be more optimal in execution term, but it is not my objective. I want the example to be concise and optimal under this term, so smaller then may be easier to catch.

Bill,

Yes, you can draw segment. Yes you can optimze but it is not the purpose of the documentation. I try to optimize the documentation to its target: get started with GUI programming with Polymorph, and let the reader enjoy.

Please consider proposing, additional advanced chapter in the CollaborActive book for some idea about optimization GUI. I will be really happy to read, to learn and to comment on that.


Laurent,

I removed the heading sections and replace it with Bold style.

Thanks for your feedback.


Hilaire



Fernando olivero a écrit :
Hi Laurent, great work! We need more documentation!

Just a little coding style i would like to point out.

I see you are using lazy initialization, but in this case i believe its a miss-use of the pattern. Because you always will have a toolbar and a menu bar, since the creation you are sure you need them, why not go and just initialize them before installing.

Let me know what you think.


So i propose changing the implementation to :

initialize
super initialize.
self initializeMenuBar.
self initializeToolbar.
....

and
initializeMenuBar
| menu |
menu := self window newMenu.
menu addToggle: 'Load'
target: self
selector: #load.
menu addToggle: 'Save'
target: self
selector: #save.
menubar := self window newToolDockingBar.
menubar add: 'File'
font: self window theme menuBarFont
icon: nil
help: 'File operations'
subMenu: menu.


------------------------------------------------------------------------

_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to