14.11.2007, 11:51 | #1 |
Участник
|
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; } 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. |
|
Теги |
runbase |
|
|