Показать сообщение отдельно
Старый 24.07.2009, 20:34   #3  
Logger is offline
Logger
Участник
Лучший по профессии 2015
Лучший по профессии 2014
 
3,971 / 3268 (116) ++++++++++
Регистрация: 12.10.2004
Адрес: Москва
Записей в блоге: 2
Спасибо. Пример хороший.

Но вопрос был про контейнеры.
Для них все плохо.

Немного переделал джоб для иллюстрации. (Запускать надо не в компании dat)
X++:
static void glibs(Args _args)
{
container   con;
CustTable custTable;
CustTable custTable2;
CustTable custTable3;
CustTable custTableCon;
CustTable custTableCon2;
CustTable custTableCon3;

List list;
ListEnumerator listEnumerator;
;

    list = new List(Types::Record);
    select firstonly custTable;
    list.addEnd(custTable);
    con = [custTable];

    changecompany ("DAT")
    {
        listEnumerator = list.getEnumerator();
        while (listEnumerator.moveNext())
        {
            custTable.data(listEnumerator.current());
            custTable2.data(listEnumerator.current());
            custTable3 = listEnumerator.current();
            info (strfmt("%1", custTable.dataAreaId));
            info (strfmt("2 : %1", custTable2.dataAreaId));
            info (strfmt("3 : %1", custTable3.dataAreaId));

            [custTableCon] = con;
            custTableCon2 = conPeek(con,1);
            //custTableCon3 = listEnumerator.current();
            info (strfmt("Con %1", custTableCon.dataAreaId));
            info (strfmt("Con2 : %1", custTableCon2.dataAreaId));
            //info (strfmt("Con3 : %1", custTableCon3.dataAreaId));

        }
    }

}