It is now possible to specify widget's namespace in .usc file. This namespace is then automatically added to each widget type in the .lay file, with the final effect that it is now not necessary to put layout include into namespace nor use "using namespace Upp;" before the include.
So, in .usc file following declaration should be valid:
namespace MyApplication::HelperWidgets;
I also saw following hack in the code:
String CurrentNamespace; // this is ugly hack, but better than rewrite everything
The whole file when the function is used is relatively simply, so why not just extract class and put current namespace as variable? Should be easy and we will have better/cleaner (easier to maintain) code in that place.
String CurrentNamespace; // this is ugly hack, but better than rewrite everything
The whole file when the function is used is relatively simply, so why not just extract class and put current namespace as variable? Should be easy and we will have better/cleaner (easier to maintain) code in that place.
Klugier
Would need to redesign about 1000 lines of code. Not really worth it in this case.