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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 20.03.2008, 14:05   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
axStart: Always add str tostring() method on your class for debug purpose.
Источник: http://axstart.spaces.live.com/Blog/...C0A0!285.entry
==============


Did you ever wonder how the debug is able to add watches on object?
Sometimes you get additional information like on the class QueryBuildRange. But on your own class you get nothing. The reason is that you did not implement the tostring method on your class. Lets do this example:
str tostring()
{
    sysdictclass sdt = new sysdictclass(classnum(class1));//hard coded because AX has no WhoAmI method
    sysdictclass extendsSdt = new sysdictclass(sdt.extend());
    str result;
    ;
    result = strfmt('%1 | ',sdt.toString());
    if(extendsSdt)
    {
        result += strfmt('extends %1 | ',extendsSdt.toString());
    }
    result += strfmt('run on %1',xglobal::clientKind());//also possible to se with the icon in the debugger in AX 4.0
    return result;
}
 
Now you are able to se what kind of class is used. This is just an example but from now, you can make everything visible in the debugger.


Источник: http://axstart.spaces.live.com/Blog/...C0A0!285.entry
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
axaptapedia: RunBaseBatch Blog bot DAX Blogs 0 04.04.2009 22:05
Sample Design Patterns: SysDictClass method implementedBy() returns as if class implements itself Blog bot DAX Blogs 0 25.10.2007 05:44
Kashperuk Ivan: List panels in Dynaics AX - a short description of SysListPanel class Blog bot DAX Blogs 1 21.10.2007 22:51
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, время: 00:10.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.