sorry dumb question here… I’m defining a method to display information for a date. It shows up as mDisplayDate() in the method editor when what I need is mDisplayDate(dateParameter). I can manually enter the parameter in the method editor no problems, but how would I then get access to the parameters inside the mDisplayDate method?
I’ve had a look through the documentation but can’t seem to find any information on this. this is pretty fundamental so obviously i must just be looking in the wrong place.
You can just put in the parameter(s) you want when calling - then in the method - you can access those parameters using an array notation (i.e. arguments[0]).
For example:
var today = new Date;
var dateFormatted = mDisplayDate(today);
that’s exactly what I needed and I’ve got it working fine now. That’s probably something that should be put into the documentation. section 5.3.9 of the Advanced programmers guide discusses passing parameters but not how you access them once you have passed them in to a function.
Any time frame available when or wich new manuals will be completed?
Hi Bert,
We just completed updating the Servoy Developer Edition User’s Guide, the Servoy Client Edition User’s Guide, and the Servoy Application Server Administrator’s Guide to bring them current with the Servoy 1.2 release.