Re: [Axapta-Knowledge-Village] operation from combination of enum

2005-03-17 Thread daniel lim
hi, i already found the way to loop thru an enum, i think that way is useful for me.   anyway thx for ur suggestion.  :-)   rgds, danielVarden Morris <[EMAIL PROTECTED]> wrote: Hi Daniel   Add this function to the global class so that you will be able to call it anywhere in code in your Axapt

Re: [Axapta-Knowledge-Village] operation from combination of enum

2005-03-17 Thread daniel lim
hi, i already found the way to loop thru an enum, i think that way is useful for me.   anyway thx for ur suggestion.  :-)   rgds, danielJohn D souza <[EMAIL PROTECTED]> wrote: yes you can use this logic;   counter  = 0;     while (counter < 16)    {firstEnumValue    = counter mod 4

Re: [Axapta-Knowledge-Village] operation from combination of enum

2005-03-17 Thread John D souza
yes you can use this logic;   counter  = 0;     while (counter < 16)    {firstEnumValue    = counter mod 4;secondEnumValue    = counter div 4; }   in this you way you start from counter = 0, which means enum value 0 for both first and second enum,   when counter = 1 then

Re: [Axapta-Knowledge-Village] operation from combination of enum

2005-03-17 Thread Varden Morris
Hi Daniel   Add this function to the global class so that you will be able to call it anywhere in code in your Axapta application:   static int UniqueEnumCombo(int Enum1, int Enum2) {     return str2int(int2str(Enum1) + int2str(Enum2)); }   All this function does is to convert two integers to t

Re[2]: [Axapta-Knowledge-Village] operation from combination of enum

2005-03-17 Thread Max Belugin
Hello daniel lim, четверг, 17 марта 2005 г., you wrote: dl> then i will need to do it for 16 times also right?any better dl> way?because later i may hav 3 combinations or more! if you have 16 different actions for 16 combinations - you have to write 16 combinations. or you can use run

Re: [Axapta-Knowledge-Village] operation from combination of enum

2005-03-17 Thread daniel lim
hi Max, then i will need to do it for 16 times also right?any better way?because later i may hav 3 combinations or more!   thx,   danielMax Belugin <[EMAIL PROTECTED]> wrote: Hello daniellim_yh,÷åòâåðã, 17 ìàðòà 2005 ã., you wrote:d> i have 2 enum type, 4 elements each, i wonder wat is the best

Re: [Axapta-Knowledge-Village] operation from combination of enum

2005-03-16 Thread Max Belugin
Hello daniellim_yh, ÷åòâåðã, 17 ìàðòà 2005 ã., you wrote: d> i have 2 enum type, 4 elements each, i wonder wat is the best way d> for me to do d> like this in axapta. - you can use macro with template like if(a==%1 && a==%2) %3; - you can declare action pair map like: [[value1, value2, action

[Axapta-Knowledge-Village] operation from combination of enum

2005-03-16 Thread daniellim_yh
hi all, i have 2 enum type, 4 elements each, i wonder wat is the best way for me to do like this in axapta. if (enum1::typeA && enum2::typeW) Do something1 else if (enum1::typeA && enum2::typeX) Do something 2 else if (enum1::typeA && enum2::typeY) do somet