 | | From: | Erich Zippel | | Subject: | Argvector in header | | Date: | Fri, 21 Jan 2005 18:19:49 +0100 |
|
|
 | Maybe today I am just stupid once again, but I don't see why my code's not working. Can anyone have a look?
I hafe the following function in the menu of my forms
function PERSSETTINGS_onClick local aParams aParams=new assocarray() aParams["Formname"] = form.text do edmsettings.wfm with true,aParams return
And in the header of the form I try to use it:
local f f = new edmsettingsForm() // f.params = new assocarray() // trying that did not help at all // if argcount( ) > 1 f.params = argvector(2) // endif
msgbox(type('f.params["Formname"]'))
// this already tells me a 'U' for undefined, so my parameter never comes
f.rowset.filter = "Formular = '"+f.params["Formname"]+"'" f.mdi=true f.open() return
Also an alternative in the form header does not work.
local f parameter mdi,params f = new edmsettingsForm() f.params=params
Erich Zippel
|
|
 | | From: | Bruce Beacham | | Subject: | Re: Argvector in header | | Date: | Fri, 21 Jan 2005 18:04:19 +0000 |
|
|
 | > local f > f = new edmsettingsForm() > // f.params = new assocarray() // trying that did not help at all > // if argcount( ) > 1 > f.params = argvector(2) > // endif > > msgbox(type('f.params["Formname"]'))
f is local. You need it to be private.
Bruce Beacham
|
|
 | | From: | Erich Zippel | | Subject: | Re: Argvector in header | | Date: | Fri, 21 Jan 2005 19:26:57 +0100 |
|
|
 | Simple reason, tired eyes, big consequences,...
Thanks a lot.
Erich Zippel
"Bruce Beacham" schrieb im Newsbeitrag news:e9LCdP%23$EHA.1708@news-server... >> local f >> f = new edmsettingsForm() >> // f.params = new assocarray() // trying that did not help at all >> // if argcount( ) > 1 >> f.params = argvector(2) >> // endif >> >> msgbox(type('f.params["Formname"]')) > > f is local. You need it to be private. > > > Bruce Beacham
|
|
 | | From: | Bowen Moursund [DataTech] | | Subject: | Re: Argvector in header | | Date: | Fri, 21 Jan 2005 11:25:23 -0600 |
|
|
 | > And in the header of the form I try to use it: > > local f > f = new edmsettingsForm() > // f.params = new assocarray() // trying that did not help at all > // if argcount( ) > 1 > f.params = argvector(2) > // endif > > msgbox(type('f.params["Formname"]'))
Ya gotta receive the arguments:
parameters arg1, arg2 local f f = new edmsettingsForm() f.params = new assocarray() // trying that did not help at all if argcount( ) > 1 f.params = argvector(2) endif msgbox(type('f.params["Formname"]'))
-- Bowen Moursund DataTech Consulting & Development http://www.bmmnet.us
|
|
 | | From: | Erich Zippel | | Subject: | Re: Argvector in header | | Date: | Fri, 21 Jan 2005 19:00:52 +0100 |
|
|
 | Well, I'm afraid I still get an 'U'-ndefined.
It also happens when directly assigning: f.params = arg2 Also problem is independent of calling from menu or form.button.
BTW I have a lot of other parameters in headers working quite fine without the parmeters statement. Made a further check on that: What worked fine earlier was using the parameter in the onOpen/OnRender of the form/report. And that works for the example given (with our without the 'parameters arg1,arg2 statement).
Well that would almost solve my problem,... .... but still I'd like to understand, how a variable can go into hide.
Erich ZIppel
"Bowen Moursund [DataTech]" schrieb im Newsbeitrag news:7P6Bu59$EHA.1708@news-server... >> And in the header of the form I try to use it: >> >> local f >> f = new edmsettingsForm() >> // f.params = new assocarray() // trying that did not help at all >> // if argcount( ) > 1 >> f.params = argvector(2) >> // endif >> >> msgbox(type('f.params["Formname"]')) > > Ya gotta receive the arguments: > > parameters arg1, arg2 > local f > f = new edmsettingsForm() > f.params = new assocarray() // trying that did not help at all > if argcount( ) > 1 > f.params = argvector(2) > endif > msgbox(type('f.params["Formname"]')) > > -- > Bowen Moursund > DataTech > Consulting & Development > http://www.bmmnet.us >
|
|
 | | From: | Bruce Beacham | | Subject: | Re: Argvector in header | | Date: | Fri, 21 Jan 2005 18:07:20 +0000 |
|
|
 | Bowen Moursund [DataTech] wrote: >>And in the header of the form I try to use it: >> >> local f >> f = new edmsettingsForm() >> // f.params = new assocarray() // trying that did not help at all >> // if argcount( ) > 1 >> f.params = argvector(2) >> // endif >> >> msgbox(type('f.params["Formname"]')) > > > Ya gotta receive the arguments: > > parameters arg1, arg2
I don't think you do, when you refer to argvector(n).
x = 1 y = 2 showinfo(x, y) return
FUNCTION showinfo
? argvector(1) ? argvector(2) return
Bruce Beacham
|
|