|
![]() |
#1 |
Axapta
|
А ведь достаточно было просто зайти в Developers Guide...
Цитата:
Constructing a form from your X++ code
When you construct a form from your X++ code, you must use the system classes. Your code lines should look similar to the following form = ClassFactory.FormRunClass(formstr(CustTable)); form.init(); form.run(); ClassFactory is an object of the class xClassFactory that holds the method FormRunClass that returns a new FormRun object. The idea of using this indirection is to make it possible to inherit the FormRun class and override selected methods to change the behavior of the form executor. Subsequently, you can have all forms in the system executed with the new class instead of the ordinary FormRun by supplying the inherited class in the FormRunClass() method. The system constructs all forms activated from the Application Object Tree using the xClassFactory. |
|
![]() |
#2 |
Участник
|
Я вас понял,спасибо.
Но сделаем небольшой акцент на эту строчку X++: form.detach(); |
|
![]() |
#3 |
Axapta
|
Не "не откроется", а "откроется и закроется".
|
|
![]() |
#4 |
Боец
|
Цитата:
form.wait(); или form.detach(); В 1м случае, выполнение кода остановится на строке form.wait() до тех пор, пока вызываемую форму пользователь не закроет. Используется, когда нельзя закрывать вызывающую форму, пока не закроется вызываемая. Во 2м случае - форма вызывается в "Отвязанном" режиме, и строка form.detach(); не препятствует дальнейшему выполнению кода. |
|
|
За это сообщение автора поблагодарили: Logger (2), Максим Gall (1). |
Теги |
menuitem, запуск, как правильно, открыть форму, программно, форма |
|
Опции темы | Поиск в этой теме |
Опции просмотра | |
|