Hi Byteway,


Why do you want to use a separate class to display a dialog? Perhaps you should consider to inherite your class from RunBase or RunBaseBatch and use the dialog method instead. Have a look at the nice called tutorial Tutorial_RunbaseBatch.

You can parse an object with args like this:

Args args = new Args();
MyClass class = new Class();
MyNewClass newClass;

args.parmObject(class);
newClass = MyNewClass::main(args);

Args also enables you to parse e.g. strings and enums, like this:

    args = new args();
    args.parmEnumType(enumnum(NoYes));
    args.parmEnum(NoYes::Yes);
    args.parm("Test");

//Lars




-----Original Message-----
From: byteway_so [mailto:[EMAIL PROTECTED]
Sent: 26. juli 2004 13:44
To: [EMAIL PROTECTED]
Subject: [development-axapta] Re: Passing Args



But what do you do when you want to solve it using the Axapta best
practise? In this case I have a dialog that runs a NewMyClass().

In the main-method of the dialog I would have something like:
//...
Args myArgs;
MyNewClass myNewClass;
;

  if(dlg.prompt())
  {
    dlg.run();

    //I need something to pass the values
    myArgs = new Args("aFileName", "date", "amount");//->does not
compile

    //Then I would like to create an instance of MyNewClass using
    myNewClass = MyNewClass::main(myArgs);

}

So the initial question asked before is still valid.
How to solve this (design) problem?
That is: how to pass variables from a dialog to a (new) class object?

* Should I create a newMyClass with a main method that contains a
container instead of the Args object? Or is there a better (best
practise) way?

like:

static void main(container _container)
{
  //...
}





Yahoo! Groups Sponsor     

ADVERTISEMENT
<http://us.ard.yahoo.com/SIG=129uqajp5/M=295196.4901138.6071305.3001176/D=groups/S=1705006764:HM/EXP=1090931858/A=2128215/R=0/SIG=10se96mf6/*http://companion.yahoo.com> click here     
  <http://us.adserver.yahoo.com/l?M=295196.4901138.6071305.3001176/D=groups/S=:HM/A=2128215/rand=270523472>      


  _____ 

Yahoo! Groups Links


*      To visit your group on the web, go to:
http://groups.yahoo.com/group/development-axapta/ <http://groups.yahoo.com/group/development-axapta/>
 

*      To unsubscribe from this group, send an email to:
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
 

*      Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service <http://docs.yahoo.com/info/terms/> .




[Non-text portions of this message have been removed]


Yahoo! Groups Sponsor
ADVERTISEMENT
click here


Yahoo! Groups Links

Reply via email to