https://download.uib.de/opsi4.1/documen ... lfunctions
Uhm, the catch is that you can not put those local functions just anywhere in the [actions] part of the script. You have to define the function first, then you can use it. Of course, this seems logical after a while, it is a script that is parsed.
However, wouldn't it be a better idea to have a place where you can just dump the local functions? [functions] perhaps?
Or would it be better to not include local functions at all, in most cases, and just load a common library on the client with functions?
Local Functions
- SisterOfMercy
- Beiträge: 1531
- Registriert: 22 Jun 2012, 19:18
Local Functions
Bitte schreiben Sie Deutsch, when I'm responding in the German-speaking part of the forum!
Re: Local Functions
Hi Sister,
you are right, opsis-script is an interpreter and so a function has to be known before you can call it.
I will write a big hint in the docu pointing to this.
From my point of view is this the best way.
And it is now implemented this way. To change this without breaking the scripts that using the now implemented way would be hard.
cheers
detlef
you are right, opsis-script is an interpreter and so a function has to be known before you can call it.
I will write a big hint in the docu pointing to this.
From my point of view is this the best way.
And it is now implemented this way. To change this without breaking the scripts that using the now implemented way would be hard.
cheers
detlef
opsi support - uib gmbh
For productive opsi installations we recommend support contracts.
http://www.uib.de
http://www.opsi.org
For productive opsi installations we recommend support contracts.
http://www.uib.de
http://www.opsi.org
- SisterOfMercy
- Beiträge: 1531
- Registriert: 22 Jun 2012, 19:18
Re: Local Functions
Thanks, that will be enough.d.oertel hat geschrieben:I will write a big hint in the docu pointing to this.
Maybe we can teach jEdit to fold the code, but that is totally outside the scope of opsi.
Bitte schreiben Sie Deutsch, when I'm responding in the German-speaking part of the forum!