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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 09.02.2008, 19:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
Ruslan Goncharov: Quick sorting in info messages
Источник: http://rusgon.blogspot.com/2008/02/q...-messages.html
==============


Sometimes developer face the problem formatting of information messages to user, namely how to sort any items in message especially without duplications. Don't design own sorting algorhytms indeed.
Let's use class Set. The question is toString() method automatically sorts the values and supresses duplicate values.
Following job illustrates how to prepate formatting message using toString() method.

X++:
static void JobSetSorting(Args _args)
{
    str         out;
    set         is = new set (types::Real);
    ;

    is.add(0.5);
    is.add(1.25);
    is.add(1.0);
    is.add(3.0);
    is.add(0.5);

    out = is.toString();

    out = strReplace(out,"{", "");
    out = strReplace(out,"}", "");
    //out = strReplace(out,",", "/");

    box::info("In fact: "+out);
}
Источник: http://rusgon.blogspot.com/2008/02/q...-messages.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Ruslan Goncharov: A few words about sorting codes Blog bot DAX Blogs 0 18.02.2009 21:05
Ruslan Goncharov: SysListSelect Blog bot DAX Blogs 0 31.07.2008 22:05
Ruslan Goncharov: Scrolling in AX 3.0 without dll Blog bot DAX Blogs 0 09.03.2008 23:20
Ruslan Goncharov: Sending message to user Blog bot DAX Blogs 0 26.01.2008 18:22
Вылетает аxапта 4.0 при завершении работы Delfins DAX: Прочие вопросы 5 27.06.2007 15:43

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

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

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