[Laszlo-dev] proposal to change setters API, to pass only a single argument

P T Withington ptw at pobox.com
Tue Feb 5 05:45:01 PST 2008


[Later]

This is LPP-274.  If you are going to work on it, take it.  But please  
record any discussion in the bug comments.

---

There's one tricky place in the LFC that depends on this second arg:

__LZsetProperty in LzState

this is used generically and relies on the second argument, so you  
would need an alternative plan for that.

The reason a 3rd arg is used elsewhere is to get around this wart.

Compare with Lisp setf methods, which take the 'place' to set as the  
_first_ arg and thus can have any number of values as subsequent args...

On 2008-02-04, at 17:52 EST, Henry Minsky wrote:

> This is a proposal to change the API for setter functions, such that
> they take just one argument, the value to be set.
>
> For background on this issue see
> http://www.openlaszlo.org/jira/browse/LPP-274  applyArgs passes an
> undocumented 2nd argument to all setters
>
>
> The current API is that LzNode.__LZapplyArgs calls setters with a
> second argument, the name of the property being set.
>
> The proposed change is that we omit the second arg, and applyArgs will
> only pass a single arg, the value being set.
>
> There don't seem to be many cases of apps which actually depend on the
> presence of the second arg, but I have seen
> cases where people have used a third arg, to allow passing extra info
> to their setters. Code which does this will have to be modified.
>
>
>
>
>
>
>
>
>
>
>
>
> -- 
> Henry Minsky
> Software Architect
> hminsky at laszlosystems.com



More information about the Laszlo-dev mailing list