Collaborating???

Jun 29, 2012 at 3:26 PM

Hallo Jinhao,

First: thank you for Nana!!

I have many ideas, many questions and some suggestion.

I think Nana can be VERY interest for people learning C++.

Console applications are no more acceptable (even for simple examples), for the new generation that have “always” with GUI the PC used (with some kind of windows). Fast all other GUI libraries hat some deformation of C++, at least in the style that is normally “right” in C++. They are no gut for C++ beginners. That is why the C++ books for beginners use normally console applications only. I think many beginner switch quickly to Java or VB after a “this book use only console application examples”. You need to read a 1k page book without making a single simple windows in yours screen?? This is not for beginners looking for a language to write cool applications. And not only… I´m self in my 40´, but the user of my soft expect windows…

As you can see I am not a professional programmer. In fact I have only limited experience with C++. In particular Git is new for me. I have it installed and locally commit. It work (thank to you, I am using it for my project too).

I have compiled Nana with VC11, with VS2012RC. I want to send you this solution. I write for beginners too, so I have all directory dependences included in the project directly. I want your comments. I have a small modification of your Hello Word, to have fun with C++.

How can I “push” it back to you????

Coordinator
Jul 3, 2012 at 4:08 AM
Edited Jul 3, 2012 at 6:02 AM

Thank you for your suggestion.

To be honest, the examples that I use main() function are just for a purpose of conforming to standard C++, and it was just a indication of Consoles under Windows, it really confuses C++ beginners, thank you for your reminding, I will pay attention to this kind of issue.

Code contribution appreciated! You can commit to your fork with the clone URL: https://git01.codeplex.com/forks/qpcr4vir/mynana.

Here is the information:

http://codeplex.codeplex.com/wikipage?title=Forks

Regards

Jinhao

Jul 11, 2012 at 3:20 PM
Edited Jul 11, 2012 at 6:48 PM

Hallo Jinhao,

I have created a fork, and 2 new branches. I'm now investigating how the code works.

There are pretty complex thing in it, and I will not touch it.

But some things are simpler, because they are in the “user” site (my site).

For example many (or all?) widgets use a rectangle as basic form. And many widgets have some variants of constructor to define this rectangle. I introduced the use of yours nana::rectangle deeper into the class structure and the corresponding constructors. I hope this could simplify the documentation with one unified constructor for all widget (without the need for many different constructors), something like:

Wd (wd, const rectangle &r=rectangle(), bool visible=false );

and not necessary   Wd (wd, x,y, w,h );

With is:   Wd (wd, rectangle( point(x,y), size(w,h)) );

And for the create() function too.

These are minor changes that could be not very interesting for you. They are in branch rect of my fork. I don’t mind I expect you to introduce it in Nana, but just to inform you about.

I have read about your adoption of boost. It is good, very good. But I would like you to introduce only minimal dependences that could significantly affect the installation and use of Nana. (I installed Boost with precompiled lib and it toke 1Gb!). I hope you select something smaller dependencies.

Talking about Boost, it will be good if you use their filesystem lib. This lib is in revision 2 for approval into a std c++ lib. I thing using it is a guarantee for a future.

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3365.html

Now I have the new Nana Cpp11 version from you. Good. But a think Nana have now 4 variant of the sources: Cpp03, Cpp11 with Linux and win32 each. It could be very difficult to you to maintain all in parallel. Maybe they could be better something like one branches for each? I’m not sure…

Best regards

Coordinator
Jul 12, 2012 at 4:34 AM

Every reasonable change which is better than existing design is welcome. To be honest, the current design may be unreasonable or inconsiderate, such as these constructors and create() method.

The library dependences are really important, excessive dependences are complex for installation, that is why I implement the class functor and other classes. In C++11, I deprecate these classes that can be found in standard library.