Patrick Bovens
11/18/2005 11:26:00 AM
I'm sorry, guess this is only available in Ax40.
--
Patrick Bovens (MBS Denmark)
"Lars K. Schunk" wrote:
> Hello Patrick,
>
> The parameterName thing doesn't seem to work.
>
> dictMethod.parameterName(parameterIdx)
>
> This function, parameterName, does not exist in my system. Axapta 3.0 SP3.
>
> Lars
>
>
>
> "Patrick Bovens (MSFT)" <PatrickBovensMSFT@discussions.microsoft.com> wrote
> in message news:6EB6C76C-C9E3-4EDF-AC72-F1C898F67EB0@microsoft.com...
> > Have a look at this code, it may help you getting started. You will be
> > able
> > to pull most of the info out of the methods, even stuff like variables
> > etc.
> > This code will only show object methods, but it's easily updated to list
> > static methods too.
> >
> > Cheers,
> >
> > --
> > Patrick Bovens (Promentum BV / MBS Denmark)
> >
> > ------------------------------------------------------------------------------------
> >
> > static void ListParameters(Args _args)
> > {
> > DictClass dictClass;
> > DictMethod dictMethod;
> >
> > int dictObjectMethodIdx;
> > int parameterIdx;
> >
> > ;
> >
> > dictClass = new DictClass(classnum(AxdSalesOrder));
> >
> > if (dictClass)
> > {
> > for (dictObjectMethodIdx = 1; dictObjectMethodIdx <=
> > dictClass.objectMethodCnt(); dictObjectMethodIdx++)
> > {
> > dictMethod = dictClass.objectMethodObject(dictObjectMethodIdx);
> >
> > info(strFmt('Method name: %1', dictMethod.name()));
> >
> > for (parameterIdx = 1; parameterIdx <=
> > dictMethod.parameterCnt(); parameterIdx++)
> > {
> > info(strFmt('Parameter %1 is of type %2',
> > dictMethod.parameterName(parameterIdx),
> > dictMethod.parameterType(parameterIdx)));
> > }
> > }
> > }
> > }
> >
> >
> >
> > "Lars K. Schunk" wrote:
> >
> >> Hi Frank,
> >>
> >> Thanks for your reply. I need the exact signature, like this, for example
> >> (from SysListPanel):
> >>
> >> private int panel_separator_mouseDown(int x, int y, int button, Boolean
> >> Ctrl, Boolean Shift)
> >>
> >> With SysMethodInfo, I can get the access specifier, the return type, and
> >> the
> >> parameter types -- but not the parameter names, like x, y, button, Ctrl,
> >> and
> >> Shift. Or am I missing something?
> >>
> >> Lars
> >>
> >>
> >>
> >> "Mike Frank" <mifra@nospam.de> wrote in message
> >> news:uLJTdPP6FHA.1148@tk2msftngp13.phx.gbl...
> >> > You can use the (Sys)MethodInfo class for that.
> >> >
> >> > SysMethodInfo methodInfo = new
> >> > SysMethodInfo(UtilElementType::ClassInstanceMethod, classnum(BinaryIO),
> >> > 'finalize');
> >> > ;
> >> > info(strfmt("%1", methodInfo.accessSpecifier()));
> >> >
> >> > If it were not for an educational project you should use that for the
> >> > 'regular' classes as well instead of parsing.
> >> >
> >> > Mike
> >>
> >>
> >>
>
>
>