SRL Archive - Lape

Cant invoke script method in default arg


riwu

2014-09-14 06:41:54


Overriding an inbuilt method doesn't work either.

@nielsie95

nielsie95

2014-09-14 09:51:56

The bug here is actually that Lape currently allows a method invocation as default value. If you call a multiple times, you'll see that it isn't calling random multiple times. Thanks for reporting :)

riwu

2014-09-14 10:27:35

ic…
guess i'll just assign -1 or sth as default arg then reassign in the method

nielsie95

2014-09-14 10:34:01

Or use an overloaded method :)

riwu

2014-09-14 11:11:31

From: nielsie95
Or use an overloaded method :)

Yeah, but i find it clumsy to duplicate entire method just to change 1/2line, esp if the method is huge…

Brandon

2014-09-14 11:25:02

From: riwu
Yeah, but i find it clumsy to duplicate entire method just to change 1/2line, esp if the method is huge…


Overloaded functions can call their predecessors.