diff --git a/docs/documentation/Guides/Overview/Tutorials/form.md b/docs/documentation/Guides/Overview/Tutorials/form.md index c6340e05edcc..31cef364d8b4 100644 --- a/docs/documentation/Guides/Overview/Tutorials/form.md +++ b/docs/documentation/Guides/Overview/Tutorials/form.md @@ -137,7 +137,7 @@ namespace example { }; } -startup_(example::form1); +startup_(example::form1::main); ``` ### Start position diff --git a/docs/documentation/Guides/xtd.core/Common I:O tasks/How-tos/copy_directories.md b/docs/documentation/Guides/xtd.core/Common I:O tasks/How-tos/copy_directories.md index 5f5c6c24d5b3..dad92f46c2fe 100644 --- a/docs/documentation/Guides/xtd.core/Common I:O tasks/How-tos/copy_directories.md +++ b/docs/documentation/Guides/xtd.core/Common I:O tasks/How-tos/copy_directories.md @@ -49,7 +49,7 @@ public: } }; -startup_(program); +startup_(program::main); ``` ## See also diff --git a/docs/documentation/Guides/xtd.core/Common I:O tasks/How-tos/enumerate_directories_and_files.md b/docs/documentation/Guides/xtd.core/Common I:O tasks/How-tos/enumerate_directories_and_files.md index a0b0649d6e30..b0e6ffea4b62 100644 --- a/docs/documentation/Guides/xtd.core/Common I:O tasks/How-tos/enumerate_directories_and_files.md +++ b/docs/documentation/Guides/xtd.core/Common I:O tasks/How-tos/enumerate_directories_and_files.md @@ -51,7 +51,7 @@ public: } }; -startup_(program); +startup_(program::main); ``` ## Examples: Use the directory_info class @@ -86,7 +86,7 @@ public: } }; -startup_(program); +startup_(program::main); ``` The following example uses the [directory_info::enumerate_files](https://gammasoft71.github.io/xtd/reference_guides/latest/classxtd_1_1io_1_1directory__info.html#aae6b6e624c5ac50f1f7bb5ec8088114a) method to list all files whose [length](https://gammasoft71.github.io/xtd/reference_guides/latest/classxtd_1_1io_1_1file__info.html#a7bbc1abbd603c19f70d687770961d195) exceeds 10MB. @@ -145,7 +145,7 @@ public: } }; -startup_(program); +startup_(program::main); ``` ## See also diff --git a/docs/documentation/Guides/xtd.core/Common I:O tasks/How-tos/open_and_append_to_a_log_file.md b/docs/documentation/Guides/xtd.core/Common I:O tasks/How-tos/open_and_append_to_a_log_file.md index 6564deff61e4..c9ab288de0e0 100644 --- a/docs/documentation/Guides/xtd.core/Common I:O tasks/How-tos/open_and_append_to_a_log_file.md +++ b/docs/documentation/Guides/xtd.core/Common I:O tasks/How-tos/open_and_append_to_a_log_file.md @@ -50,7 +50,7 @@ public: } }; -startup_(program); +startup_(program::main); // The example creates a file named "log.txt" and writes the following lines to it, // or appends them to the existing "log.txt" file: diff --git a/docs/documentation/Guides/xtd.core/Common I:O tasks/How-tos/read_and_write_to_a_newly_created_data_file.md b/docs/documentation/Guides/xtd.core/Common I:O tasks/How-tos/read_and_write_to_a_newly_created_data_file.md index 4d20484dc56d..f907d2c1ca95 100644 --- a/docs/documentation/Guides/xtd.core/Common I:O tasks/How-tos/read_and_write_to_a_newly_created_data_file.md +++ b/docs/documentation/Guides/xtd.core/Common I:O tasks/How-tos/read_and_write_to_a_newly_created_data_file.md @@ -45,7 +45,7 @@ public: } }; -startup_(program); +startup_(program::main); // The example creates a file named "Test.data" and writes the integers 0 through 10 to it in binary format. // It then writes the contents of Test.data to the console with each integer on a separate line. diff --git a/docs/documentation/Guides/xtd.core/Common I:O tasks/How-tos/read_text_from_a_file.md b/docs/documentation/Guides/xtd.core/Common I:O tasks/How-tos/read_text_from_a_file.md index cc16ca74a89c..5be9ae446ecd 100644 --- a/docs/documentation/Guides/xtd.core/Common I:O tasks/How-tos/read_text_from_a_file.md +++ b/docs/documentation/Guides/xtd.core/Common I:O tasks/How-tos/read_text_from_a_file.md @@ -32,7 +32,7 @@ public: } }; -startup_(program); +startup_(program::main); ``` ## See also diff --git a/docs/documentation/Guides/xtd.core/Common I:O tasks/How-tos/write_text_to_a_file.md b/docs/documentation/Guides/xtd.core/Common I:O tasks/How-tos/write_text_to_a_file.md index a9952a00e9cb..c2c94a9ded94 100644 --- a/docs/documentation/Guides/xtd.core/Common I:O tasks/How-tos/write_text_to_a_file.md +++ b/docs/documentation/Guides/xtd.core/Common I:O tasks/How-tos/write_text_to_a_file.md @@ -39,7 +39,7 @@ public: } }; -startup_(program); +startup_(program::main); // The example creates a file named "write_lines.txt" with the following contents: // First line @@ -70,7 +70,7 @@ public: } }; -startup_(program); +startup_(program::main); // The example adds the following line to the contents of "write_lines.txt": // Fourth Line @@ -106,7 +106,7 @@ public: } }; -startup_(program); +startup_(program::main); // The example creates a file named "write_file.txt" with the contents: // First line diff --git a/docs/documentation/Guides/xtd.core/Common I:O tasks/write_a_text_file.md b/docs/documentation/Guides/xtd.core/Common I:O tasks/write_a_text_file.md index 77b1a47f105d..e30f23258100 100644 --- a/docs/documentation/Guides/xtd.core/Common I:O tasks/write_a_text_file.md +++ b/docs/documentation/Guides/xtd.core/Common I:O tasks/write_a_text_file.md @@ -26,7 +26,7 @@ public: } }; -startup_(program); +startup_(program::main); ``` ## See also diff --git a/docs/documentation/Guides/xtd.core/Entry point/main_and_startup.md b/docs/documentation/Guides/xtd.core/Entry point/main_and_startup.md index 7f486a951a10..d30f848dd050 100644 --- a/docs/documentation/Guides/xtd.core/Entry point/main_and_startup.md +++ b/docs/documentation/Guides/xtd.core/Entry point/main_and_startup.md @@ -246,7 +246,7 @@ Behind this keyword there is a `main` global function that call `main` static me ## startup_ definition ```cpp -#define startup_(main_class) \ +#define startup_(main_method) \ auto main(int argc, char* argv[]) -> int {\ return xtd::startup::safe_run(main_method, argc, argv);\ }\ @@ -305,7 +305,7 @@ namespace examples { }; } -startup_(examples::program); +startup_(examples::program::main); ``` * Static `main` member function without argument and with int return value. diff --git a/docs/documentation/Guides/xtd.core/Events/overview.md b/docs/documentation/Guides/xtd.core/Events/overview.md index ee87b7ccfddd..fc62db7da905 100644 --- a/docs/documentation/Guides/xtd.core/Events/overview.md +++ b/docs/documentation/Guides/xtd.core/Events/overview.md @@ -127,7 +127,7 @@ class program { } }; -startup_(program); +startup_(program::main); ``` ## Static and dynamic event handlers diff --git a/docs/documentation/Guides/xtd.core/Events/raise_and_consume_events.md b/docs/documentation/Guides/xtd.core/Events/raise_and_consume_events.md index e98029234fc5..f656ec955c30 100644 --- a/docs/documentation/Guides/xtd.core/Events/raise_and_consume_events.md +++ b/docs/documentation/Guides/xtd.core/Events/raise_and_consume_events.md @@ -58,7 +58,7 @@ namespace console_application1 { }; } -startup_(console_application1::program); +startup_(console_application1::program::main); ``` ## Example 2 @@ -137,7 +137,7 @@ namespace console_application1 { }; } -startup_(console_application1::program); +startup_(console_application1::program::main); ``` ## Example 3 @@ -220,7 +220,7 @@ namespace console_application1 { }; } -startup_(console_application1::program); +startup_(console_application1::program::main); ``` # See also diff --git a/docs/documentation/Guides/xtd.core/Types overview/delegates.md b/docs/documentation/Guides/xtd.core/Types overview/delegates.md index 4a9d466f0bc0..cb5517ffb828 100644 --- a/docs/documentation/Guides/xtd.core/Types overview/delegates.md +++ b/docs/documentation/Guides/xtd.core/Types overview/delegates.md @@ -216,7 +216,7 @@ public: } }; -startup_(math_class); +startup_(math_class::main); /* Output: Invoking the delegate using 'multiply_numbers': @@ -261,7 +261,7 @@ public: } }; -startup_(test_sample_class); +startup_(test_sample_class::main); /* Output: A message from the instance method. diff --git a/docs/documentation/Guides/xtd.core/Types overview/events.md b/docs/documentation/Guides/xtd.core/Types overview/events.md index da4391869045..5589ccdccd63 100644 --- a/docs/documentation/Guides/xtd.core/Types overview/events.md +++ b/docs/documentation/Guides/xtd.core/Types overview/events.md @@ -235,7 +235,7 @@ public: } }; -startup_(program); +startup_(program::main); ``` ## See also diff --git a/docs/documentation/Guides/xtd.core/delegates_and_lambdas.md b/docs/documentation/Guides/xtd.core/delegates_and_lambdas.md index 29a829ab37c6..1062bdd5b4c7 100644 --- a/docs/documentation/Guides/xtd.core/delegates_and_lambdas.md +++ b/docs/documentation/Guides/xtd.core/delegates_and_lambdas.md @@ -31,7 +31,7 @@ public: } }; -startup_(program); +startup_(program::main); ``` @@ -62,7 +62,7 @@ public: } }; -startup_(program); +startup_(program::main); ``` The following example demonstrates the use of delegates with static method. @@ -90,7 +90,7 @@ public: } }; -startup_(program); +startup_(program::main); ``` * The `using reverse = delegate;` line creates a delegate type of a certain signature, in this case a method that takes a string parameter and then returns a string parameter. @@ -129,7 +129,7 @@ public: } }; -startup_(program); +startup_(program::main); ``` For this simple example, having a method defined outside of the `main` method seems a bit superfluous. c++11 introduced the concept of [lambda expressions](https://en.cppreference.com/w/cpp/language/lambda), which let you create `inline` methods without having to specify any additional type or method. @@ -155,7 +155,7 @@ public: } }; -startup_(program); +startup_(program::main); ``` As you can see, the delegate body is just a set of expressions, like any other delegate. diff --git a/docs/documentation/Guides/xtd.forms/Overview/xtd_forms_overview.md b/docs/documentation/Guides/xtd.forms/Overview/xtd_forms_overview.md index aa5141f4b650..87b80df4b369 100644 --- a/docs/documentation/Guides/xtd.forms/Overview/xtd_forms_overview.md +++ b/docs/documentation/Guides/xtd.forms/Overview/xtd_forms_overview.md @@ -488,7 +488,7 @@ private: label label1; }; -startup_(form1); +startup_(form1::main); // This example produces the following output display if you launch the application, // then double-click the button1 and then close the application: diff --git a/docs/documentation/eBook/first_programs.md b/docs/documentation/eBook/first_programs.md index dea61d8c7615..a2270876262a 100644 --- a/docs/documentation/eBook/first_programs.md +++ b/docs/documentation/eBook/first_programs.md @@ -38,7 +38,7 @@ start_position(xtd::forms::form_start_position::center_screen); The method [start_position](https://gammasoft71.github.io/xtd/reference_guides/latest/classxtd_1_1forms_1_1form.html#aef5f579130f9834f4f35a85a94b0cf97) centers the [xtd::forms::form](https://gammasoft71.github.io/xtd/reference_guides/latest/classxtd_1_1forms_1_1form.html) on the screen, both horizontally and vertically. ```cpp -startup_(tutorial::simple); +startup_(tutorial::simple::main); ``` The code behind [startup_](https://gammasoft71.github.io/xtd/reference_guides/latest/group__keywords.html#ga44bd440a34d147923e428eacd1c8eedd) macro can be replaced by :