AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX: За рубежом > DAX in English
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 14.11.2007, 11:51   #1  
ist is offline
ist
Участник
 
60 / 10 (1) +
Регистрация: 29.07.2007
Problem with inherited RunBase class
Hi,
First I apopogize for my english.
The my problem is:
I have class "Class1"inheritor of RunBase.In this class I have overrided dialog(), getFromDialog() and Init() methods.I have other class "Class2"who inherited mentioned above Class1.In second class I have overrided pack() and unpack() methods.When I have two instantions of "Class2" I do not close first instantion while second is opened.
How I resolve this problem?
Thank's you in advance.

Class1:

X++:
class Class1 extends RunBase
{
    NoYes checkThing;
    DialogField dialogCheckThing;
}
 
protected Object dialog()
{
    DialogRunBase dialog;
    ;
    dialog = super();
    dialogCheckThing = dialog.addFieldValue(typeid(NoYes), checkThing);
    return dialog;
}
 
public boolean getFromDialog()
{
    boolean ret;
    ret = super();
    checkThing = dialogCheckThing.value();
    return ret;
}
Class2:

X++:
class Class2 extends Class1
{
    #define.CurrentVersion(1)
    #localmacro.CurrentList
        checkThing
    #endmacro
}
 
public container pack()
{
    return [#CurrentVersion, #CurrentList];
}
 
public boolean unpack(container packedClass)
{
    boolean         _ret = false;
    Integer         _version    = conPeek(packedClass,1);
    switch (_version)
    {
        case #CurrentVersion:
            [_version, #CurrentList] = packedClass;
            _ret = true;
            break;
    }
    return _ret;
}
 
public void run()
{
    super();
    this.prompt();
}
 
public static void main(Args args)
{
    Class2 class2 = new Class2();
    ;
    if(class2.init())
    {
        class2.run();
    }
}

Последний раз редактировалось ist; 14.11.2007 в 14:49.
Старый 17.11.2007, 10:25   #2  
Maxim Gorbunov is offline
Maxim Gorbunov
Administrator
Соотечественники
Лучший по профессии 2009
 
2,483 / 645 (26) +++++++
Регистрация: 27.11.2001
Адрес: Dubai, UAE
Could you please explain your problem once again? It's not quite clear.
__________________
Not registered yet? Register here!
Have comments, questions, suggestions or anything else regarding our web site? Don't hesitate, send them to me
Старый 16.05.2008, 00:10   #3  
axstart is offline
axstart
MVP
Most Valuable Professional
NavAx Club
 
16 / 10 (1) +
Регистрация: 04.05.2008
Адрес: Holland
you must also define the macro in class1 + pack + unpack
look at the next link for more details
http://axstart.spaces.live.com/blog/...C0A0!292.entry
Теги
runbase

 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Kashperuk Ivan: List panels in Dynaics AX - a short description of SysListPanel class Blog bot DAX Blogs 1 21.10.2007 22:51
Inside Dynamics AX 4.0: RunBase Framework Extension Part IV Blog bot DAX Blogs 0 02.10.2007 04:49
Inside Dynamics AX 4.0: RunBase Framework Extension Part I Blog bot DAX Blogs 0 30.09.2007 09:20
Kashperuk Ivan: Description of ClassBuild class:Today I want to ... Blog bot DAX Blogs 0 26.01.2007 05:51
Говорят вышел SP2 для Axapta 3. Кто нибуть что знает на эту тему? soin DAX: Прочие вопросы 10 13.10.2003 10:43

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 01:02.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.