diff --git a/examples/AnimatedHello/init b/examples/AnimatedHello/init new file mode 100644 index 000000000..105447880 --- /dev/null +++ b/examples/AnimatedHello/init @@ -0,0 +1,4 @@ +#ifndef _AnimatedHello_icpp_init_stub +#define _AnimatedHello_icpp_init_stub +#include "CtrlLib/init" +#endif diff --git a/examples/Days/Days.h b/examples/Days/Days.h index aabc5f376..e8a968035 100644 --- a/examples/Days/Days.h +++ b/examples/Days/Days.h @@ -10,8 +10,6 @@ using namespace Upp; class Days : public WithDaysLayout { public: - void Compute(); - typedef Days CLASSNAME; Days(); }; diff --git a/examples/Days/Days.upp b/examples/Days/Days.upp index eb1e08dfc..b1736c81e 100644 --- a/examples/Days/Days.upp +++ b/examples/Days/Days.upp @@ -1,4 +1,4 @@ -description "Displays a number of days between two dates"; +description "Displays a number of days between two dates\377"; uses CtrlLib; diff --git a/examples/Days/main.cpp b/examples/Days/main.cpp index 4f892b07e..01e38c8e2 100644 --- a/examples/Days/main.cpp +++ b/examples/Days/main.cpp @@ -1,17 +1,12 @@ #include "Days.h" -void Days::Compute() -{ - result = IsNull(date1) || IsNull(date2) ? "" : - Format("There is %d day(s) between %` and %`", abs(Date(~date1) - Date(~date2)), ~date1, ~date2); -} - Days::Days() { CtrlLayout(*this, "Days"); - date1 <<= THISBACK(Compute); - date2 <<= THISBACK(Compute); - Compute(); + date1 ^= date2 ^= [=] { + result = IsNull(date1) || IsNull(date2) ? "" : + Format("There is %d day(s) between %` and %`", abs(Date(~date1) - Date(~date2)), ~date1, ~date2); + }; } GUI_APP_MAIN diff --git a/examples/HelloWorld/init b/examples/HelloWorld/init new file mode 100644 index 000000000..3db28d7ef --- /dev/null +++ b/examples/HelloWorld/init @@ -0,0 +1,4 @@ +#ifndef _HelloWorld_icpp_init_stub +#define _HelloWorld_icpp_init_stub +#include "CtrlLib/init" +#endif diff --git a/examples/PainterExamples/PainterExamples.upp b/examples/PainterExamples/PainterExamples.upp index 7ec4f7ae9..7f316ccd2 100644 --- a/examples/PainterExamples/PainterExamples.upp +++ b/examples/PainterExamples/PainterExamples.upp @@ -38,6 +38,6 @@ file Test.iml; mainconfig - "" = "GUI", + "" = "GUI MT", "" = "GUI";