Hi
replace args.caller(this);
with
args.caller(element);
/Stefan L
-----Ursprungligt meddelande-----
Fr�n: abcdplkm [mailto:[EMAIL PROTECTED]
Skickat: den 30 augusti 2004 11:48
Till: [email protected]
�mne: [development-axapta] Re: How to send a parameter with the clicked()
method of a button?
Hi,
I've tryed it with the Args() class, but it looks like if the
receiving form only sees an empty Args(). I tryed it with a string
value like this:
void clicked()
{
MenuFunction menuFunction;
Args args = new Args();
;
menuFunction = new MenuFunction(MenuItemDisplayStr(WebForm3),
MenuItemType::Display);
args.caller(this);
args.parm("hello");
menuFunction.run(args);
super();
}
-------------And the receiving end:----------
public void init()
{
Str qq;
;
qq = this.args().parm();
super();
}
But "qq" seems to have a standard value instead of the value "hello".
What am i doing wrong? Is it not possible to do this with webforms?
The init method doesn't have a Args() argument, isn't this
nescessary?
Regards,
Michel
--- In [email protected], "Morten Aasheim"
<[EMAIL PROTECTED]> wrote:
> You can probably try args.object(). Never tried this one myself,
but.. ;)
>
> Mvh,
> Morten
>
> -----Original Message-----
> From: abcdplkm [mailto:[EMAIL PROTECTED]
> Sent: 27. august 2004 14:38
> To: [email protected]
> Subject: [development-axapta] Re: How to send a parameter with the
clicked()
> method of a button?
>
> Hi Morten,
>
>
> Thanks for your answer!! This is the way to go for my problem, but
> still one question:
>
> I have an object which i want to pass in my args(). Which
propertie
> of the Args() class should I use?
>
> Thanks again!!
>
>
> Regards,
> Michel
>
> --- In [email protected], "Morten Aasheim"
> <[EMAIL PROTECTED]> wrote:
> > One solution is to use the Args class.
> >
> > void clicked()
> > {
> > Args args;
> > ;
> >
> > args = new Args();
> > args.caller(element.this());
> > args.record(Table);
> > args.parm(element.variableMethod());
> > new Menufunction(menuItemDisplayStr(NewForm),
> > MenuItemType::Display).run(args);
> >
> > super();
> > Table_ds.refresh();
> >
> >
> > }
> >
> > Form2:
> >
> > public void init()
> > {
> > str var;
> > table table;
> > ;
> > var = element.args().caller();
> > table = element.args().record()
> > //and so on ...
> > }
> >
> > Good luck :)
> >
> >
> > Morten
> > -----Original Message-----
> > From: abcdplkm [mailto:[EMAIL PROTECTED]
> > Sent: 27. august 2004 11:52
> > To: [email protected]
> > Subject: [development-axapta] How to send a parameter with the
> clicked()
> > method of a button?
> >
> > Hi,
> >
> > I have 2 forms and when i click on the button of form1 the other
> > form is opened. I have a variable (object) declared on form1 and
I
> > want to access this variable on form2.
> >
> > How do I do this?
> >
> > Can I send a parameter with the clicked() method of a button?
> Maybe
> > another solution? Any help is welcome!!
> >
> > Btw I'm working with webforms!
> >
> >
> > Regards,
> > Michel
> >
> >
> >
> >
> >
> >
> > Yahoo! Groups Links
>
>
>
>
>
> Yahoo! Groups Links
Yahoo! Groups Sponsor
ADVERTISEMENT
----------------------------------------------------------------------------
--
Yahoo! Groups Links
a.. To visit your group on the web, go to:
http://groups.yahoo.com/group/development-axapta/
b.. To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]
| Yahoo! Groups Sponsor | |
|
|
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/development-axapta/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

