Skip to content

Commit a9c75be

Browse files
committed
Fix startup_ documentation
1 parent cfccdf2 commit a9c75be

16 files changed

+28
-28
lines changed

docs/documentation/Guides/Overview/Tutorials/form.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ namespace example {
137137
};
138138
}
139139

140-
startup_(example::form1);
140+
startup_(example::form1::main);
141141
```
142142
143143
### Start position

docs/documentation/Guides/xtd.core/Common I:O tasks/How-tos/copy_directories.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public:
4949
}
5050
};
5151

52-
startup_(program);
52+
startup_(program::main);
5353
```
5454
5555
## See also

docs/documentation/Guides/xtd.core/Common I:O tasks/How-tos/enumerate_directories_and_files.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public:
5151
}
5252
};
5353

54-
startup_(program);
54+
startup_(program::main);
5555
```
5656
5757
## Examples: Use the directory_info class
@@ -86,7 +86,7 @@ public:
8686
}
8787
};
8888
89-
startup_(program);
89+
startup_(program::main);
9090
```
9191

9292
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:
145145
}
146146
};
147147

148-
startup_(program);
148+
startup_(program::main);
149149
```
150150
151151
## See also

docs/documentation/Guides/xtd.core/Common I:O tasks/How-tos/open_and_append_to_a_log_file.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public:
5050
}
5151
};
5252

53-
startup_(program);
53+
startup_(program::main);
5454

5555
// The example creates a file named "log.txt" and writes the following lines to it,
5656
// or appends them to the existing "log.txt" file:

docs/documentation/Guides/xtd.core/Common I:O tasks/How-tos/read_and_write_to_a_newly_created_data_file.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public:
4545
}
4646
};
4747

48-
startup_(program);
48+
startup_(program::main);
4949

5050
// The example creates a file named "Test.data" and writes the integers 0 through 10 to it in binary format.
5151
// It then writes the contents of Test.data to the console with each integer on a separate line.

docs/documentation/Guides/xtd.core/Common I:O tasks/How-tos/read_text_from_a_file.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public:
3232
}
3333
};
3434

35-
startup_(program);
35+
startup_(program::main);
3636
```
3737
3838
## See also

docs/documentation/Guides/xtd.core/Common I:O tasks/How-tos/write_text_to_a_file.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public:
3939
}
4040
};
4141

42-
startup_(program);
42+
startup_(program::main);
4343

4444
// The example creates a file named "write_lines.txt" with the following contents:
4545
// First line
@@ -70,7 +70,7 @@ public:
7070
}
7171
};
7272
73-
startup_(program);
73+
startup_(program::main);
7474
7575
// The example adds the following line to the contents of "write_lines.txt":
7676
// Fourth Line
@@ -106,7 +106,7 @@ public:
106106
}
107107
};
108108

109-
startup_(program);
109+
startup_(program::main);
110110

111111
// The example creates a file named "write_file.txt" with the contents:
112112
// First line

docs/documentation/Guides/xtd.core/Common I:O tasks/write_a_text_file.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public:
2626
}
2727
};
2828

29-
startup_(program);
29+
startup_(program::main);
3030
```
3131
3232
## See also

docs/documentation/Guides/xtd.core/Entry point/main_and_startup.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ Behind this keyword there is a `main` global function that call `main` static me
246246
## startup_ definition
247247
248248
```cpp
249-
#define startup_(main_class) \
249+
#define startup_(main_method) \
250250
auto main(int argc, char* argv[]) -> int {\
251251
return xtd::startup::safe_run(main_method, argc, argv);\
252252
}\
@@ -305,7 +305,7 @@ namespace examples {
305305
};
306306
}
307307
308-
startup_(examples::program);
308+
startup_(examples::program::main);
309309
```
310310

311311
* Static `main` member function without argument and with int return value.

docs/documentation/Guides/xtd.core/Events/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ class program {
127127
}
128128
};
129129
130-
startup_(program);
130+
startup_(program::main);
131131
```
132132

133133
## Static and dynamic event handlers

docs/documentation/Guides/xtd.core/Events/raise_and_consume_events.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ namespace console_application1 {
5858
};
5959
}
6060

61-
startup_(console_application1::program);
61+
startup_(console_application1::program::main);
6262
```
6363
6464
## Example 2
@@ -137,7 +137,7 @@ namespace console_application1 {
137137
};
138138
}
139139
140-
startup_(console_application1::program);
140+
startup_(console_application1::program::main);
141141
```
142142

143143
## Example 3
@@ -220,7 +220,7 @@ namespace console_application1 {
220220
};
221221
}
222222

223-
startup_(console_application1::program);
223+
startup_(console_application1::program::main);
224224
```
225225
226226
# See also

docs/documentation/Guides/xtd.core/Types overview/delegates.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ public:
216216
}
217217
};
218218

219-
startup_(math_class);
219+
startup_(math_class::main);
220220

221221
/* Output:
222222
Invoking the delegate using 'multiply_numbers':
@@ -261,7 +261,7 @@ public:
261261
}
262262
};
263263
264-
startup_(test_sample_class);
264+
startup_(test_sample_class::main);
265265
266266
/* Output:
267267
A message from the instance method.

docs/documentation/Guides/xtd.core/Types overview/events.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ public:
235235
}
236236
};
237237

238-
startup_(program);
238+
startup_(program::main);
239239
```
240240
241241
## See also

docs/documentation/Guides/xtd.core/delegates_and_lambdas.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public:
3131
}
3232
};
3333

34-
startup_(program);
34+
startup_(program::main);
3535
```
3636
3737
@@ -62,7 +62,7 @@ public:
6262
}
6363
};
6464
65-
startup_(program);
65+
startup_(program::main);
6666
```
6767

6868
The following example demonstrates the use of delegates with static method.
@@ -90,7 +90,7 @@ public:
9090
}
9191
};
9292

93-
startup_(program);
93+
startup_(program::main);
9494
```
9595
9696
* The `using reverse = delegate<ustring(const ustring& s)>;` 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:
129129
}
130130
};
131131
132-
startup_(program);
132+
startup_(program::main);
133133
```
134134

135135
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:
155155
}
156156
};
157157

158-
startup_(program);
158+
startup_(program::main);
159159
```
160160
161161
As you can see, the delegate body is just a set of expressions, like any other delegate.

docs/documentation/Guides/xtd.forms/Overview/xtd_forms_overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ private:
488488
label label1;
489489
};
490490

491-
startup_(form1);
491+
startup_(form1::main);
492492

493493
// This example produces the following output display if you launch the application,
494494
// then double-click the button1 and then close the application:

docs/documentation/eBook/first_programs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ start_position(xtd::forms::form_start_position::center_screen);
3838
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.
3939

4040
```cpp
41-
startup_(tutorial::simple);
41+
startup_(tutorial::simple::main);
4242
```
4343
4444
The code behind [startup_](https://gammasoft71.github.io/xtd/reference_guides/latest/group__keywords.html#ga44bd440a34d147923e428eacd1c8eedd) macro can be replaced by :

0 commit comments

Comments
 (0)